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
+5Lines changed: 5 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,8 +11,13 @@ In the Chrome console,
11
11
invoke the function `alert` with an input string of `"Hello world!"`;
12
12
13
13
What effect does calling the `alert` function have?
14
+
The alert function call a small separate window pop out, written "Hello world!". There is a OK button at the bottom right to dismiss it.
14
15
15
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`.
16
17
17
18
What effect does calling the `prompt` function have?
19
+
The prompt function pop out a small window similar to alert but it has a input section where I can type my name.
20
+
18
21
What is the return value of `prompt`?
22
+
The return value of prompt is a string. If we did not enter anything and pressed ok, the value is also a string.
23
+
However, if we pressed cancel, it will return null.
0 commit comments