Skip to content

Commit 00fc139

Browse files
committed
changes on chron stretch commits
1 parent 5776aa5 commit 00fc139

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,11 @@ 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+
Answer: It creates a pop up window on the browser.
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+
Answer: It creates a pop up window which allows the user to input data. This prompt has a cancel and an 'OK' button.
1820
What is the return value of `prompt`?
21+
Answer: The return value will depend on what the user inputs. If the user presses the 'cancel' button, then the return is null. If the user presses 'OK' without entering anything, then the return type is an empty string. Else if something is written by the user, then the return value will be what the user has entered.

0 commit comments

Comments
 (0)