Tell us what’s happening:
Describe your issue in detail here.
Your code so far
I having a hard time figuring this out
function telephoneCheck(str) {
const regex = /'^'(1\s?)?(\()?\d{3}(?(2)\))[-.\s]?\d{3}[-.\s]?\d{4}$/;
return regex.test(str);
};
console.log(telephoneCheck("555-555-5555"));
Your browser information:
User Agent is: Mozilla/5.0 (Android 9; Mobile; rv:109.0) Gecko/119.0 Firefox/119.0
Challenge Information:
JavaScript Algorithms and Data Structures Projects - Telephone Number Validator