Skip to content

Commit 0290b7c

Browse files
solving objects exercise
1 parent c6f0fd0 commit 0290b7c

1 file changed

Lines changed: 95 additions & 1 deletion

File tree

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

Lines changed: 95 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,106 @@ In this activity, we'll explore some additional concepts that you'll encounter i
55
Open the Chrome devtools Console, type in `console.log` and then hit enter
66

77
What output do you get?
8+
Answer : an object : log() { [native code] }
89

910
Now enter just `console` in the Console, what output do you get back?
11+
Answer : an object
12+
console {debug: ƒ, error: ƒ, info: ƒ, log: ƒ, warn: ƒ, …}
13+
assert
14+
:
15+
ƒ assert()
16+
clear
17+
:
18+
ƒ clear()
19+
context
20+
:
21+
ƒ context()
22+
count
23+
:
24+
ƒ count()
25+
countReset
26+
:
27+
ƒ countReset()
28+
createTask
29+
:
30+
ƒ createTask()
31+
debug
32+
:
33+
ƒ debug()
34+
dir
35+
:
36+
ƒ dir()
37+
dirxml
38+
:
39+
ƒ dirxml()
40+
error
41+
:
42+
ƒ error()
43+
group
44+
:
45+
ƒ group()
46+
groupCollapsed
47+
:
48+
ƒ groupCollapsed()
49+
groupEnd
50+
:
51+
ƒ groupEnd()
52+
info
53+
:
54+
ƒ info()
55+
log
56+
:
57+
ƒ log()
58+
memory
59+
:
60+
MemoryInfo {totalJSHeapSize: 19300000, usedJSHeapSize: 18200000, jsHeapSizeLimit: 3760000000}
61+
profile
62+
:
63+
ƒ profile()
64+
profileEnd
65+
:
66+
ƒ profileEnd()
67+
table
68+
:
69+
ƒ table()
70+
time
71+
:
72+
ƒ time()
73+
timeEnd
74+
:
75+
ƒ timeEnd()
76+
timeLog
77+
:
78+
ƒ timeLog()
79+
timeStamp
80+
:
81+
ƒ timeStamp()
82+
trace
83+
:
84+
ƒ trace()
85+
warn
86+
:
87+
ƒ warn()
88+
Symbol(Symbol.toStringTag)
89+
:
90+
"console"
91+
[[Prototype]]
92+
:
93+
Object
1094

1195
Try also entering `typeof console`
12-
96+
97+
Answer : object
1398
Answer the following questions:
1499

15100
What does `console` store?
101+
Answer : The console object does not permanently store data; instead, it provides an interface to record, display, and inspect temporary logs, warnings, and errors in the environment's debugging tool or terminal.
16102
What does the syntax `console.log` or `console.assert` mean? In particular, what does the `.` mean?
103+
104+
Answer :
105+
106+
The console.log() is a method that accepts any value and outputs that the given value to the console
107+
108+
The console.assert() is a static method that writes an error message to the console if the assertion is false. If the assertion is true, nothing happens.
109+
110+
The `.` is dot notation — it access the methods that belongs to the console object. such as log, assert, error .... ext

0 commit comments

Comments
 (0)