Skip to content

Commit b28011e

Browse files
committed
Enhance examples in objects.md to clarify console usage and output
1 parent e82c680 commit b28011e

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

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

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,21 @@ Open the Chrome devtools Console, type in `console.log` and then hit enter
66

77
What output do you get?
88

9+
ƒ log() { [native code] }
10+
911
Now enter just `console` in the Console, what output do you get back?
1012

13+
console {debug: ƒ, error: ƒ, info: ƒ, log: ƒ, warn: ƒ, …}
14+
1115
Try also entering `typeof console`
16+
'object'
1217

1318
Answer the following questions:
1419

1520
What does `console` store?
21+
22+
console stores different functions (like log, assert, warn, error) that you can use to interact with the console.
23+
24+
1625
What does the syntax `console.log` or `console.assert` mean? In particular, what does the `.` mean?
26+
console.log("Hello") means: Look in the console object, find the log function, and run it with "Hello" as the argument.

0 commit comments

Comments
 (0)