Skip to content

Commit a40c512

Browse files
committed
answered the questions of 4-stretch-explore of sprint-1
1 parent 90c1eca commit a40c512

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,13 @@ Let's try an example.
1010
In the Chrome console,
1111
invoke the function `alert` with an input string of `"Hello world!"`;
1212

13+
1314
What effect does calling the `alert` function have?
15+
it will show a pop up with hello world
1416

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+
it will give a text box propmt with myName to enter my name.
1821
What is the return value of `prompt`?
22+
its a string.

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,20 @@ 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+
function defination
9+
810

911
Now enter just `console` in the Console, what output do you get back?
12+
This prints the entire console object with all its methods, like log, warn, error, etc.
1013

1114
Try also entering `typeof console`
15+
This prints the entire console object with all its methods, like log, warn, error, etc.
1216

1317
Answer the following questions:
1418

1519
What does `console` store?
20+
object
1621
What does the syntax `console.log` or `console.assert` mean? In particular, what does the `.` mean?
22+
console.log("Hello") calls the log method to print something to the console.
23+
24+
console.assert(condition, "Message") calls the assert method to check a condition, and only prints the message if the condition is false.

0 commit comments

Comments
 (0)