Skip to content

Commit ca8de22

Browse files
committed
Complete stretch explore notes for Chrome console and objects
1 parent 16d0805 commit ca8de22

2 files changed

Lines changed: 10 additions & 0 deletions

File tree

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,7 @@ Now try invoking the function `prompt` with a string input of `"What is your nam
1313

1414
What effect does calling the `prompt` function have?
1515
What is the return value of `prompt`?
16+
## Answers
17+
- alert("Hello world!") shows a browser alert dialog with that message.
18+
- prompt("What is your name?") shows an input dialog asking for a name.
19+
- prompt returns the typed string if OK is pressed, or null if Cancel is pressed.

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,9 @@ Answer the following questions:
1414

1515
What does `console` store?
1616
What does the syntax `console.log` or `console.assert` mean? In particular, what does the `.` mean?
17+
## Answers
18+
- console.log is a function (native code).
19+
- console is an object containing logging methods.
20+
- typeof console is "object".
21+
- console stores the browser/devtools console API object.
22+
- The dot `.` means property access: console.log is the log property (a function) on the console object.

0 commit comments

Comments
 (0)