Skip to content

Commit c1a241b

Browse files
committed
correct typos and explain alert and prompt in Chrome console
1 parent da54930 commit c1a241b

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,20 @@
1-
Open a new window in Chrome, right click an empty space on the page, select **Inspect** from the dropdown, then locate the **Console** tab.
1+
Open a new window in Chrome, right click page, select **Inspect** from the dropdown, then locate the **Console** tab.
22

33
Voila! You now have access to the [Chrome V8 Engine](https://www.cloudflare.com/en-gb/learning/serverless/glossary/what-is-chrome-v8/).
44
Just like the Node REPL, you can input JavaScript code into the Console tab and the V8 engine will execute it.
55

66
Let's try an example.
77

8-
In the Chrome console, invoke the function `alert` with one argument, the string `"Hello world!"`;
8+
Click an empty space on tn the Chrome console, invoke the function `alert` with one argument, the string `"Hello world!"`;
99

1010
What effect does calling the `alert` function have?
1111

12+
// The `alert` function displays a message to the user and it stops js execution until the user dismisses the alert
13+
1214
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`.
1315

1416
What effect does calling the `prompt` function have?
1517
What is the return value of `prompt`?
18+
19+
// The `prompt` function opens a popup dialog and waits an input from a user. it stops js execution until the user inputs or cancel the popup dialog
20+
// The return value of `prompt` is a string

0 commit comments

Comments
 (0)