Skip to content

Commit e953ec6

Browse files
authored
Update explanations for alert and prompt functions
Clarified effects and return values of alert and prompt functions.
1 parent 78097f1 commit e953ec6

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

‎Sprint-2/4-stretch-explore/chrome.md‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,9 @@ Let's try an example.
88
In the Chrome console, invoke the function `alert` with one argument, the string `"Hello world!"`;
99

1010
What effect does calling the `alert` function have?
11+
alert() is a function that displays a message to the user.its return value is undefined.
1112

1213
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`.
1314

14-
What effect does calling the `prompt` function have?
15-
What is the return value of `prompt`?
15+
What effect does calling the `prompt` function have?It provides a text box where the user can enter their name, along with buttons such as OK and Cancel.
16+
What is the return value of `prompt`? prompt() returns a value.

0 commit comments

Comments
 (0)