We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 838110d commit 832af0eCopy full SHA for 832af0e
Sprint-1/4-stretch-explore/chrome.md
@@ -19,3 +19,10 @@ What effect does calling the `prompt` function have?
19
It opens a popup asking for the user’s name, and lets the user type something.
20
What is the return value of `prompt`?
21
A string that contains what the user typed (e.g. “Ahmad”).
22
+
23
+If we were writing a program that uses prompt() to ask for an input value, how could
24
+the program check if the user clicked "OK" or "Cancel"?
25
26
+If the user clicks **OK**, it returns the string they typed, even an empty string when there is nothing written.
27
28
+If the user clicks **Cancel**, it returns null.
0 commit comments