Skip to content

Commit 64a6dc6

Browse files
committed
test alert and prompt functions in Chrome V8 Console
1 parent 2a31470 commit 64a6dc6

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

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

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,22 @@ Let's try an example.
1010
In the Chrome console,
1111
invoke the function `alert` with an input string of `"Hello world!"`;
1212

13-
What effect does calling the `alert` function have? It opens a popup message box in the browser with the text:
13+
1. What effect does calling the `alert` function have?
14+
15+
It opens a popup message box in the browser with the text:
1416
You must click "OK" to dismiss it before you can do anything else on the page.
1517

16-
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`.
18+
2. Now try invoking the function `prompt` with a string input of `"What is your name?"` -
19+
20+
store the return value of your call to `prompt` in an variable called `myName`.
21+
22+
3. What effect does calling the `prompt` function have?
1723

18-
What effect does calling the `prompt` function have? It opens a popup input box asking:
24+
It opens a popup input box asking:
1925
What is your name?
2026
and I can enter a response, then click "OK" or "Cancel".
2127

22-
What is the return value of `prompt`? Return value:
28+
4. What is the return value of `prompt`? Return value:
2329

2430
If I enter a name (e.g., "Sami") and press OK, it returns the string: "Sami"
2531

0 commit comments

Comments
 (0)