Skip to content

Commit 06fba0d

Browse files
committed
answering questions in chrome.md
1 parent 3f07582 commit 06fba0d

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,13 @@ 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+
The alert function call a small separate window pop out, written "Hello world!". There is a OK button at the bottom right to dismiss it.
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+
The prompt function pop out a small window similar to alert but it has a input section where I can type my name.
20+
1821
What is the return value of `prompt`?
22+
The return value of prompt is a string. If we did not enter anything and pressed ok, the value is also a string.
23+
However, if we pressed cancel, it will return null.

0 commit comments

Comments
 (0)