Skip to content

Commit 51e97e9

Browse files
committed
Add answers for console.log, console object, and typeof console
1 parent 70a4005 commit 51e97e9

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

Sprint-1/4-stretch-explore/objects.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,18 @@ In this activity, we'll explore some additional concepts that you'll encounter i
55
Open the Chrome devtools Console, type in `console.log` and then hit enter
66

77
What output do you get?
8+
I get the function definition for console.log (function log()).
89

910
Now enter just `console` in the Console, what output do you get back?
11+
I get console {debug: ƒ, error: ƒ, info: ƒ, log: ƒ, warn: ƒ, …}
1012

1113
Try also entering `typeof console`
1214

1315
Answer the following questions:
1416

1517
What does `console` store?
18+
console stores an object with many functions like log, error, warn, assert.
19+
1620
What does the syntax `console.log` or `console.assert` mean? In particular, what does the `.` mean?
21+
console.log or console.assert means we are calling a function inside the console object.
22+
The dot (.) means “access this property of the object”.

0 commit comments

Comments
 (0)