Hello, I am currently learning JS and I am practicing loops using this page:
Here is my code, which is exactly what is on the page above:
The exercise I am doing is the one in the Exiting Loops w Break Section. I copied the code into my visual studio code to practice the syntax but the problem is as follows.
In the guide I am following, under the exercise is a sample of the code working, which works each time I put in a name. However, when I write the code and run it in my browser, I can only look up a contact successfully one time, after that, any search returns “Contact Not Found,” unless I refresh the page. Does anyone know why this is happening? Is my code missing something?