Skip to content

Commit fa07668

Browse files
committed
explaination
1 parent cd05719 commit fa07668

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

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

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,30 @@ Answer the following questions:
1414

1515
What does `console` store?
1616
What does the syntax `console.log` or `console.assert` mean? In particular, what does the `.` mean?
17+
18+
what i get from Chrpme devtools Console:
19+
20+
>console.log
21+
<.ƒ log() { [native code] }
22+
23+
>console
24+
<.console {debug: ƒ, error: ƒ, info: ƒ, log: ƒ, warn: ƒ, …}
25+
26+
>typeof console
27+
<.object'
28+
29+
'console store': console is an object provided by the browser (in this case, Chrome).It stores functions for outputting information to the Console, such as:log(): Print general information.error(): Print error messages.warn(): Show warnings.info(): Show info-level messages.
30+
assert(): Log a message only if a condition is false....and more
31+
32+
What does the syntax `console.log` or `console.assert` mean? In particular, what does the `.` mean?
33+
The . is the dot operator, used to access properties or methods of an object.
34+
In console.log, you're accessing the log method on the console object.
35+
So:
36+
console = object
37+
.log or .assert = method on that object
38+
39+
console is a built-in object
40+
console.log is a method used to print messages to the Console
41+
The . is used to access a method or property on an object
42+
43+

0 commit comments

Comments
 (0)