Skip to content

Commit 1f7f9e2

Browse files
tried sprint-1/4-stretch-explore/chrome.md
1 parent a5cd1c5 commit 1f7f9e2

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed
Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Open a new window in Chrome,
22

3-
then locate the **Console** tab.
3+
then locate the **Console** tab. (short cut for linux ctrl+shift+j)
44

55
Voila! You now have access to the [Chrome V8 Engine](https://www.cloudflare.com/en-gb/learning/serverless/glossary/what-is-chrome-v8/).
66
Just like the Node REPL, you can input JavaScript code into the Console tab and the V8 engine will execute it.
@@ -9,10 +9,16 @@ Let's try an example.
99

1010
In the Chrome console,
1111
invoke the function `alert` with an input string of `"Hello world!"`;
12+
ans: done!
1213

1314
What effect does calling the `alert` function have?
15+
ans: pops out a message with given strings inside alert arguments
1416

1517
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+
ans: myname = prompt("What is your name?");
1619

1720
What effect does calling the `prompt` function have?
21+
ans: pops out a message with input field and we can store the input value into a variable
22+
1823
What is the return value of `prompt`?
24+
ans: return value is the string given by user

0 commit comments

Comments
 (0)