Skip to content

Commit 38532cf

Browse files
committed
Answered the question about 'alert & prompt'
1 parent 242fca7 commit 38532cf

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
@@ -12,7 +12,12 @@ invoke the function `alert` with an input string of `"Hello world!"`;
1212

1313
What effect does calling the `alert` function have?
1414

15+
`answer` // there ll be a pop-up box showing a message and ask us to press ok in order to get rid of it.
16+
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+
`answer` // Here we also have a pop-up box with an input, and it asks the user to type something.
21+
1822
What is the return value of `prompt`?
23+
`answer` // if the user type something it returns `string` if the user cancel it then it return `null`.

0 commit comments

Comments
 (0)