Validate US Telephone Numbers1

Hey,I don;t know how to do it do you help me??

Your code so far

function telephoneCheck(str) {
  // Good luck!
  return true = ;
}



telephoneCheck("555-555-5555");

Your browser information:

Your Browser User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.181 Safari/537.36.

Link to the challenge:
https://www.freecodecamp.org/challenges/validate-us-telephone-numbers

What have you tried?

i tried all what it want

You haven’t shared any code or description of approaches you have tried and how they failed. We can’t help if we don’t know where you’re at.

function telephoneCheck(str) {
// Good luck!
return true;
}

telephoneCheck(“555-555-5555”);
telephoneCheck(“123**&!!asdf#”);
telephoneCheck(“55555555”);
telephoneCheck("(6505552368)");

I have tried that

function telephoneCheck(str) {
var regex = /^(2\s?)?((\d{3})|\d{3})[\s-]?\d{3}[\s-]?\d{4}$/;
return regex.test(str);
}
telephoneCheck(“555-555-5555”);
and that