Skip to content

Commit 5480a21

Browse files
committed
complete 4-stretch-explore
1 parent 31a1166 commit 5480a21

File tree

2 files changed

+36
-0
lines changed

2 files changed

+36
-0
lines changed

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,11 @@ invoke the function `alert` with an input string of `"Hello world!"`;
1212

1313
What effect does calling the `alert` function have?
1414

15+
An alert box pops up in the browser window displaying my Hello World! message.
16+
1517
Now try invoking the function `prompt` with a string input of `"What is your name?"` - store the return value of your call to `prompt` in an variable called `myName`.
1618

1719
What effect does calling the `prompt` function have?
20+
A prompt box pops up, displaying my question and an input field for me to answer.
1821
What is the return value of `prompt`?
22+
My answer as a string.

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

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,44 @@ 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+
ƒ log() { [native code] } <-- tells me log() is a native function of Javascript
89

910
Now enter just `console` in the Console, what output do you get back?
11+
console {debug: ƒ, error: ƒ, info: ƒ, log: ƒ, warn: ƒ, …}
12+
assert: ƒ assert()
13+
clear: ƒ clear()
14+
context: ƒ context()
15+
count: ƒ count()
16+
countReset: ƒ countReset()
17+
createTask: ƒ createTask()
18+
debug: ƒ debug()
19+
dir: ƒ dir()
20+
dirxml: ƒ dirxml()
21+
error: ƒ error()
22+
group: ƒ group()
23+
groupCollapsed: ƒ groupCollapsed()
24+
groupEnd: ƒ groupEnd()
25+
info: ƒ info()
26+
log: ƒ log()
27+
memory: MemoryInfo {totalJSHeapSize: 48746582, usedJSHeapSize: 43721570, jsHeapSizeLimit: 4395630592}
28+
profile: ƒ profile()
29+
profileEnd: ƒ profileEnd()
30+
table: ƒ table()
31+
time: ƒ time()
32+
timeEnd: ƒ timeEnd()
33+
timeLog: ƒ timeLog()
34+
timeStamp: ƒ timeStamp()
35+
trace: ƒ trace()
36+
warn: ƒ warn()
37+
Symbol(Symbol.toStringTag): "console"
38+
[[Prototype]]: Object <-- prints out the console object with all its properties
1039

1140
Try also entering `typeof console`
41+
'object' <-- data type of console
1242

1343
Answer the following questions:
1444

1545
What does `console` store?
46+
The console object stores a series of functions that help with debugging code.
1647
What does the syntax `console.log` or `console.assert` mean? In particular, what does the `.` mean?
48+
The syntax console.log, called dot notation, is the simplest method to access the properties of an object. The "." identifies log as a property of console. Without it we would not be able to access the function, nor use it.

0 commit comments

Comments
 (0)