Use the Array.join() method to concatenate all array elements to the O/P string.
Use the g flag to match all digits in a phone number.
Match the first digit in a phone number.
No-Library (pure JS), HTML, CSS, JavaScript