+ 1
What is the result if I press ok in a prompt without writing anything ?
Javascript question
5 Antworten
+ 3
🔫 Rick Grimes I think it returns null if you press cancel, although this behaviour varies for browsers, like safari, it sometimes returns empty string as well for Esc or cancel the prompt
+ 2
null.
+ 2
Oh yes m8 Мг. Кнап🌠
I was confused a little on cancel and ok.
+ 2
Thank you guys
+ 1
You won't get anything, just empty string, since prompt on press of ok returns the value passed to it.