Skip to content

Commit c1a4b08

Browse files
committed
answered questions about objects
1 parent 082f415 commit c1a4b08

1 file changed

Lines changed: 17 additions & 1 deletion

File tree

‎Sprint-2/4-stretch-explore/objects.md‎

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

77
What output do you get?
88

9+
it showed the log function rather than calling it f log() { [natice code]}
10+
911
Now enter just `console` in the Console, what output do you get back?
1012

13+
the console objects and properties/functions ie, {debug:f, error:f, info:f, log:f, warn:f,...}
14+
1115
Try also entering `typeof console`
1216

17+
we get 'object' why?--> because console is an object
18+
1319
Answer the following questions:
1420

1521
What does `console` store?
16-
What does the syntax `console.log` or `console.assert` mean? In particular, what does the `.` mean?
22+
23+
console is an object that contains properties/functions used to interact with chrome/browser developer console.
24+
25+
What does the syntax `console.log` or `console.assert` mean?
26+
27+
console.log = access the log property inside the console object.
28+
console.assert = access the assert property inside the console object.
29+
30+
In particular, what does the `.` mean?
31+
32+
The dot . is called the property accessor operator used to access an object's property. It also tells Javascript to go inside this object and get a particular property.

0 commit comments

Comments
 (0)