Telephone Number Validator I am so proud of finding this 'starter' solution for this project that I would like someone to add it to the ''get hints'' section.. I know it's not perfect but it's the one starters will understand the most. Thanks

Tell us what’s happening:

Your code so far


function telephoneCheck(str) {
/* let re=/\d\d\d-\d\d\d-\d\d\d\d|\(\d\d\d\) ?\d\d\d-?\d\d\d\d|(\d\d\d)\s\d\d\d-\d\d\d\d|\d\d\d\s\d\d\d\s\d\d\d\d|\d\d\d\d\d\d\d\d\d\d|1\s\d\d\d\s\d\d\d\s\d\d\d\d/; */
let re=/^1? ?(\(\d\d\d\)|\d\d\d)\-? ?\d\d\d\-? ?\d\d\d\d$/;
  // Good luck!
  return re.test(str);
}

telephoneCheck("555-555-5555");

Your browser information:

User Agent is: Mozilla/5.0 (Linux; Android 6.0.1; SM-N910C) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.116 Mobile Safari/537.36.

Link to the challenge: