During this module I incorporate the string and regular expressions into 4 function that were used for validation. The validation was for checking for the correct formats for emails and phone numbers. I used RegEx functions to do so for the string values. My struggles were I was first using the test() function which did not return a Boolean value which I needed to use for my if blocks but then I remembered the exec() function does.

To see the example visit http://erikalicea.esy.es/testing.html
Here is the code I used:

5

An issue with the array in the lecture was that on line 17 where the first array n1 was being initialized it did not have the correct syntax. When the number of elements were being set they should have been surrounded by brackets [5] not parenthesis.