Interactive javascript


#1

i clicked on cancel . so, now it is always showing error. plz, help me how can i fix that problem ?


#2

The result from the prompt is a string or otherwise null, you could just assign that to the variable yourself. in the code.

https://developer.mozilla.org/en-US/docs/Web/API/Window/prompt