Skip to content
Advertisement

how to restart a else if loop if a user enters a wrong number

JavaScript

So I wrote this simple calculator code but I dont know how to make user repeat the whole cycle if they enter a wrong number I thought of doing it using while loop and boolean is valid i have no idea how to do it a little help would be appreciated :)

Advertisement

Answer

Here’s your answer:
just simply put that calculator code in a infinite loop for wrong entry.

JavaScript
User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement