Skip to content

Commit e8f5887

Browse files
committed
Sprint 1 stretch: object exploration notes
1 parent 1749f57 commit e8f5887

File tree

1 file changed

+47
-0
lines changed

1 file changed

+47
-0
lines changed

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

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,53 @@ Explore the Chrome DevTools console and investigate what the console object stor
2020

2121
---
2222

23+
### Useful links
24+
- https://developer.mozilla.org/en-US/docs/Web/API/Console
25+
- https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Working_with_objects
26+
27+
28+
29+
## objects.md
30+
31+
### What output did I get?
32+
33+
- `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
67+
68+
---
69+
2370
### Useful links
2471
- https://developer.mozilla.org/en-US/docs/Web/API/Console
2572
- https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Working_with_objects

0 commit comments

Comments
 (0)