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-2/4-stretch-explore/chrome.md
+7-3Lines changed: 7 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,10 +8,14 @@ Let's try an example.
8
8
In the Chrome console, invoke the function `alert` with one argument, the string `"Hello world!"`;
9
9
10
10
What effect does calling the `alert` function have?
11
-
answer: calling alert("Hello World!") displays a pop-up dialogue box in the browser window containing the message "Hello World!" and an ok button that poses the script execution until dismissed
11
+
12
+
answer: it displays a pop-up dialog box in the browser window containing the message "Hello World!" and an ok button that pauses the page execution until the user dismisses it
13
+
12
14
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`.
13
15
14
16
What effect does calling the `prompt` function have?
15
-
answer: the prompt exercution returned a pop up dialogue box containing the message and text input field, an ok button and a cancel button.
17
+
answer: it pops up a box asking a question with a text field where you can type in your answer, plus an OK and cancel buttons.
18
+
16
19
What is the return value of `prompt`?
17
-
answer: it returns the string entered by the user in the text input field when I click ok.
20
+
21
+
answer: it returns the text typed by the user as a string in the text input field when they click ok.
0 commit comments