Tell us what’s happening:
Having some problems returning my code false in my test cases
**Your code so far**
function telephoneCheck(str) {
var patt = new RegExp(/^\+?1?\s*?\(?\d{3}(?:\)|[-|\s])?\s*?\d{3}[-|\s]?\d{4}$/);
return patt.test(str);
}
telephoneCheck(" 555-555-5555");
**Your browser information:**
User Agent is: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/95.0.4638.69 Safari/537.36
Challenge: Telephone Number Validator
Link to the challenge: