Skip to content

Commit 87f5865

Browse files
committed
Input javaScript code into the chrome console practice
1 parent 7d4af4e commit 87f5865

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

‎Sprint-2/4-stretch-explore/chrome.md‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,14 @@ Just like the Node REPL, you can input JavaScript code into the Console tab and
66
Let's try an example.
77

88
In the Chrome console, invoke the function `alert` with one argument, the string `"Hello world!"`;
9-
9+
1010
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.
1112

1213
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`.
1314

1415
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+
1518
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

Comments
 (0)