Skip to content

Commit 7ed381b

Browse files
committed
4-stretch-explore done
1 parent a4c8522 commit 7ed381b

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

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

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

1313
What effect does calling the `alert` function have?
14+
answer : Displays a pop-up dialog box with a message and an OK button; execution pauses until OK is clicked.
1415

1516
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`.
1617

1718
What effect does calling the `prompt` function have?
19+
Displays a pop-up dialog box with a message and a text input field; execution pauses until OK or Cancel is clicked.
20+
1821
What is the return value of `prompt`?
22+
Returns the string entered by the user if OK is clicked, or null if Cancel is clicked.

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,18 @@ 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 : It shows ƒ log() { [native code] }.
89

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

1113
Try also entering `typeof console`
14+
Answer:object
1215

1316
Answer the following questions:
1417

1518
What does `console` store?
19+
Answer:console is an object that stores methods for logging and debugging, like log, error, warn, assert, etc.
20+
1621
What does the syntax `console.log` or `console.assert` mean? In particular, what does the `.` mean?
22+
Answer: The . accesses a property or method of the console object.

0 commit comments

Comments
 (0)