Skip to content

Commit f94b1e6

Browse files
answered questions
1 parent 28d4987 commit f94b1e6

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-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+
a pop up box appears saying thecharitych.com says this is an alert
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+
a pop up box appears saying thecharitych.com says What is your name
20+
1821
What is the return value of `prompt`?
22+
when I do console.log(answer); it returns the value myName

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

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,22 @@ 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?
19+
console stores functions and allows you to display and inspect information in the browser console.
20+
1621
What does the syntax `console.log` or `console.assert` mean? In particular, what does the `.` mean?
22+
console.log prints the value of whatever you ask it to print ie console.log(portfolio) would print the value of portfolio whereas console.log("portfolio") would print the actual word portfolio.
23+
24+
console.assert tests for a condition but only returns a message if the condition is false. For instance it may be used to check the age of a person to restrict access to a site for adults only.
25+
26+
the full stop is used to separate the object from the method. Console is the object and log and assert are methods

0 commit comments

Comments
 (0)