Skip to content

Commit 950078c

Browse files
committed
Finished both stretch-explore tasks
1 parent 7456ec0 commit 950078c

2 files changed

Lines changed: 31 additions & 0 deletions

File tree

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
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.
2+
3+
Voila! You now have access to the [Chrome V8 Engine](https://www.cloudflare.com/en-gb/learning/serverless/glossary/what-is-chrome-v8/).
4+
Just like the Node REPL, you can input JavaScript code into the Console tab and the V8 engine will execute it.
5+
6+
Let's try an example.
7+
8+
In the Chrome console, invoke the function `alert` with one argument, the string `"Hello world!"`;
9+
10+
What effect does calling the `alert` function have?
11+
12+
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+
What effect does calling the `prompt` function have?
15+
What is the return value of `prompt`?
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
## Objects
2+
3+
In this activity, we'll explore some additional concepts that you'll encounter in more depth later on in the course.
4+
5+
Open the Chrome devtools Console, type in `console.log` and then hit enter
6+
7+
What output do you get?
8+
9+
Now enter just `console` in the Console, what output do you get back?
10+
11+
Try also entering `typeof console`
12+
13+
Answer the following questions:
14+
15+
What does `console` store?
16+
What does the syntax `console.log` or `console.assert` mean? In particular, what does the `.` mean?

0 commit comments

Comments
 (0)