```
function isValidPhoneNumber(number) {
  const regex = /^\d{10}$|^\d{3}-\d{3}-\d{4}$/;
  return regex.test(number);
}
```
function isValidPhoneNumber(number) {
  const regex = /^\d{10}$|^\d{3}-\d{3}-\d{4}$/;
  return regex.test(number);
}