Skip to content

Commit a7f84c3

Browse files
committed
Answered 4-stretch-explore/chrome.md
1 parent 4f7798d commit a7f84c3

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

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

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,14 @@ invoke the function `alert` with an input string of `"Hello world!"`;
1212

1313
What effect does calling the `alert` function have?
1414

15+
- It shows a modal pop-up box.
16+
1517
Now try invoking the function `prompt` with a string input of `"What is your name?"` - store the return value of your call to `prompt` in an variable called `myName`.
1618

1719
What effect does calling the `prompt` function have?
18-
What is the return value of `prompt`?
20+
21+
- The browser shows the pop-up dialogue box with the question `"What is your name?"`, two buttons "Cancel" and "Ok" and text input field where user can type their name
22+
23+
## What is the return value of `prompt`?
24+
25+
- If user typed something in the text input field that'll be the return value with data type String, even if user typed numbers. If user pressed "Cancel" button, then value'll be null.

0 commit comments

Comments
 (0)