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
+5-1Lines changed: 5 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,10 +6,14 @@ Just like the Node REPL, you can input JavaScript code into the Console tab and
6
6
Let's try an example.
7
7
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
+
It created a pop up message in the broswer saying Hello world and an ok button.
11
12
12
13
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
14
14
15
What effect does calling the `prompt` function have?
16
+
It displays a pop up message in the browswer asking the user "What is your name?", it also inludes an OK and Cancel button
17
+
15
18
What is the return value of `prompt`?
19
+
I entered my Sima and clicked OK, so the return value is "Sima" which is stored as myName.
0 commit comments