Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions Sprint-1/4-stretch-explore/chrome.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,11 @@ In the Chrome console,
invoke the function `alert` with an input string of `"Hello world!"`;

What effect does calling the `alert` function have?
->It creat a pop up with the word "Hello world!"

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

What effect does calling the `prompt` function have?
What is the return value of `prompt`?
-> It displays a dialog box in the browser asking the user to enter some input.
The user can type a response and click "OK" or click "Cancel".
7 changes: 7 additions & 0 deletions Sprint-1/4-stretch-explore/objects.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,19 @@ In this activity, we'll explore some additional concepts that you'll encounter i
Open the Chrome devtools Console, type in `console.log` and then hit enter

What output do you get?
-> ƒ log() { [native code] }

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

Try also entering `typeof console`
->'object'

Answer the following questions:

What does `console` store?
->console stores an object that contains functions for outputting information to the browser’s debugging console.

What does the syntax `console.log` or `console.assert` mean? In particular, what does the `.` mean?
->The . operator accesses a specific property or method on an object. console.log means "use the log function from the console object.
console.assert means access the assert function inside the console object.
Loading