Skip to content

Commit a1c659f

Browse files
committed
completed stretch chrome.md and objects.md with comments
1 parent 7d7305a commit a1c659f

File tree

2 files changed

+18
-1
lines changed

2 files changed

+18
-1
lines changed

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,18 @@ Let's try an example.
99

1010
In the Chrome console,
1111
invoke the function `alert` with an input string of `"Hello world!"`;
12+
alert('Hello World!');
1213

1314
What effect does calling the `alert` function have?
15+
A pop up modal box appears with "Hello World!"
1416

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`.
18+
let myName = prompt("What is your name?");
1619

1720
What effect does calling the `prompt` function have?
21+
It displays a modal dialog box with a text input field which can be completed.
22+
1823
What is the return value of `prompt`?
24+
It is hidden, it does not display anything. The box closes.
25+
When I do a console.log(myName); it returns Angela.
26+

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

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,21 @@ 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] }
89

910
Now enter just `console` in the Console, what output do you get back?
11+
console {debug: ƒ, error: ƒ, info: ƒ, log: ƒ, warn: ƒ, …}
1012

1113
Try also entering `typeof console`
14+
'object'
1215

1316
Answer the following questions:
1417

1518
What does `console` store?
16-
What does the syntax `console.log` or `console.assert` mean? In particular, what does the `.` mean?
19+
It does not store anything. Its purpose is to hold a collection of methods (functions) that help you debug, log, or inspect your code.
20+
21+
What does the syntax `console.log` or `console.assert` mean?,
22+
They print outputs.It provides methods for debugging, logging, and inspecting code.
23+
24+
In particular, what does the `.` mean?
25+
The dot is a member access operator that connects the object to its property or method.

0 commit comments

Comments
 (0)