Skip to content

Commit 1286cf1

Browse files
committed
Complete 4-stretch-explore
1 parent 30b52c8 commit 1286cf1

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

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

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

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

15+
It opens a dialog box in the browser displaying the message you provide.
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+
21+
It opens a dialog box in the browser that asks the user to input text.
22+
1823
What is the return value of `prompt`?
24+
25+
It returns the text entered by the user as a string, or `null` if the user cancels the prompt.

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,19 @@ Open the Chrome devtools Console, type in `console.log` and then hit enter
66

77
What output do you get?
88

9+
`ƒ log() { [native code] }`
10+
911
Now enter just `console` in the Console, what output do you get back?
1012

1113
Try also entering `typeof console`
1214

1315
Answer the following questions:
1416

1517
What does `console` store?
18+
19+
Various methods and properties (e.g. `log`, `error`, `trace`)
20+
1621
What does the syntax `console.log` or `console.assert` mean? In particular, what does the `.` mean?
22+
23+
The `.` is dot notation used to access a property or method of an object.
24+
`console.log` means you are accessing the `log` method that belongs to the `console` object.

0 commit comments

Comments
 (0)