We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 98526f2 commit fb4774fCopy full SHA for fb4774f
String/FormatPhoneNumber.js
@@ -1,7 +1,7 @@
1
/**
2
* @description - function that takes 10 digits and returns a string of the formatted phone number e.g.: 1234567890 -> (123) 456-7890
3
* @param {string} phoneNumber
4
- * @returns {string} - Formate to (XXX) XXX-XXXX pattern
+ * @returns {string} - Format to (XXX) XXX-XXXX pattern
5
*/
6
const formatPhoneNumber = (phoneNumber) => {
7
if ((phoneNumber.length !== 10) || isNaN(phoneNumber)) {
0 commit comments