About prompt clashing

My document have two or more prompt command… but it pop upping continues…
I want them after printing one’s result. what will do for that?

1 Like

@himachandranp65 ,
When not in use, you can comment out your prompt code; if you are working with the first question, comment out all remaining prompt code. Whenever you need that, uncomment those and use them.

1 Like

Could you tell any other alternative to do that , like in a program their may be more number of inputs shall be take from user so, their might be more chance to use prompt for every time who can we use comments

1 Like

@kollidayakar77 ,

Yes, we have an alternative way also, which is to put your prompt code in any of the conditions, and if the condition is true, it will pop up.

Another way is that you have to put this prompt code in the setTimeout function, as below. It will only work if it reaches the time specified in setTimeout function.

   },5000); // 5000 to load it after 5 seconds from page load
1 Like