Skip to content

Commit 832af0e

Browse files
committed
Answered the questio on line 23 & 24.
1 parent 838110d commit 832af0e

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

Sprint-1/4-stretch-explore/chrome.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,10 @@ What effect does calling the `prompt` function have?
1919
It opens a popup asking for the user’s name, and lets the user type something.
2020
What is the return value of `prompt`?
2121
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

Comments
 (0)