Javascript if...else and prompt and alert messages

Yes you were missing the ‘else’ after the first ‘if’ block which meant the first rule was tested and if true produced a pop up reply.

Then you had the next section which was going to produce another popup whatever.

With the else in the right place you ensure that only one of those statements can be true. :slight_smile: