You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-`console.log` → returned a function definition (ƒ log() { [native code] })
34
+
-`console` → returned an object with many methods such as log, warn, error, assert
35
+
-`typeof console` → returned "object"
36
+
37
+
---
38
+
39
+
### What does `console` store?
40
+
The console variable stores an object that contains multiple debugging methods. These methods allow developers to print messages, warnings, errors, and other diagnostic information in the browser console.
41
+
42
+
---
43
+
44
+
### What does `console.log` or `console.assert` mean?
45
+
These expressions use dot notation to access methods inside the console object.
46
+
For example:
47
+
-`console.log` accesses the log function
48
+
-`console.assert` accesses the assert function
49
+
50
+
---
51
+
52
+
### What does the `.` mean?
53
+
The dot operator is called dot notation.
54
+
It is used to access properties or methods of an object.
55
+
56
+
So:
57
+
-`console` is the object
58
+
-`log` is a method inside that object
59
+
-`console.log` means "access the log method from the console object"
60
+
61
+
---
62
+
63
+
### What I learned
64
+
- Objects store related data and functions together
65
+
- The browser console itself is an object
66
+
- Dot notation is how we interact with object properties and methods
0 commit comments