+ 2
When is the second parameter of prompt useful in which cases can we use it?
3 ответов
+ 1
Second parameter in prompt mostly comes up as a placeholder like in HTML input tag!
+ 1
Yeah but placeholder remains in background while the text in this case stays and we have to erase it to write anything...
0
the second parament can be an empty string like this
ex.
prompt("how are you today?", " ");
because some browsers will put undefined if no second parameter is defined