You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Sprint-1/4-stretch-explore/chrome.md
+10-4Lines changed: 10 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,16 +10,22 @@ Let's try an example.
10
10
In the Chrome console,
11
11
invoke the function `alert` with an input string of `"Hello world!"`;
12
12
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:
14
16
You must click "OK" to dismiss it before you can do anything else on the page.
15
17
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?
17
23
18
-
What effect does calling the `prompt` function have? It opens a popup input box asking:
24
+
It opens a popup input box asking:
19
25
What is your name?
20
26
and I can enter a response, then click "OK" or "Cancel".
21
27
22
-
What is the return value of `prompt`? Return value:
28
+
4.What is the return value of `prompt`? Return value:
23
29
24
30
If I enter a name (e.g., "Sami") and press OK, it returns the string: "Sami"
0 commit comments