CIW JavaScript Specialist
This example tests whether a telephone number includes the proper sequence of numbers. First, it checks for three numbers followed by a (-). Then it checks for another three numbers followed by a (-). Finally, it checks for four numbers. You can test this by changing the phone number in the source code (var myTeleNum). If you enter a number that does not follow proper phone number format, you will see true change to false.