Given a string, write a function to check if it is a valid telephone number.

"123-456-7890"
user
function isValidPhoneNumber(phoneNumber) {
  const regex = /^\d{3}-\d{3}-\d{4}$/;
  return regex.test(phoneNumber);
}
assistant