Skip to content

Commit 656d965

Browse files
committed
Learning objects in JS
1 parent 7d2bbe6 commit 656d965

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

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

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,18 @@ Try also entering `typeof console`
1313
Answer the following questions:
1414

1515
What does `console` store?
16+
// Console is an object that stores properties as fucntions. (Think of import = math, math.sqrt(9))
17+
1618
What does the syntax `console.log` or `console.assert` mean? In particular, what does the `.` mean?
19+
// It means that you are calling on console to run this particular function in your javascript code.
20+
// console.log: access property(log) inside object(console).
21+
// The . is the property access operator.
22+
// The () contain an argument(s) which run the code.
23+
24+
My code:
25+
console.log
26+
ƒ log() { [native code] }
27+
console
28+
console {debug: ƒ, error: ƒ, info: ƒ, log: ƒ, warn: ƒ, …}
29+
typeof console
30+
'object'

0 commit comments

Comments
 (0)