Skip to content

Commit 21a7389

Browse files
committed
Test 'alert' and 'Answering object.md questions
1 parent 6673a2a commit 21a7389

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

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

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

77
What output do you get?
88

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

13+
-The output : console {debug: ƒ, error: ƒ, info: ƒ, log: ƒ, warn: ƒ, …} + a lot of functions under it.
14+
1115
Try also entering `typeof console`
1216

13-
Answer the following questions:
17+
-The output : object
18+
19+
-Answer the following questions:
1420

1521
What does `console` store?
22+
23+
-Answer : console is an object with debugging methods.
24+
It does not store variables or result. It provide methods for outputting , data , object and more.
25+
1626
What does the syntax `console.log` or `console.assert` mean? In particular, what does the `.` mean?
27+
28+
Answer:
29+
-console is a built-in object.
30+
-log and assert are properties of that object, specifically functions (methods).
31+
-The console.assert() static method writes an error message to the console if the assertion is false. If the assertion is true, nothing happens.
32+
-The console.log() static method outputs a message to the console.
33+
-'.' means use this method from this object.

0 commit comments

Comments
 (0)