You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Sprint-2/4-stretch-explore/chrome.md
+3-2Lines changed: 3 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,8 +8,9 @@ Let's try an example.
8
8
In the Chrome console, invoke the function `alert` with one argument, the string `"Hello world!"`;
9
9
10
10
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.
11
12
12
13
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`.
13
14
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