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-1/4-stretch-explore/chrome.md
+8-1Lines changed: 8 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,7 +12,14 @@ invoke the function `alert` with an input string of `"Hello world!"`;
12
12
13
13
What effect does calling the `alert` function have?
14
14
15
+
- It shows a modal pop-up box.
16
+
15
17
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`.
16
18
17
19
What effect does calling the `prompt` function have?
18
-
What is the return value of `prompt`?
20
+
21
+
- The browser shows the pop-up dialogue box with the question `"What is your name?"`, two buttons "Cancel" and "Ok" and text input field where user can type their name
22
+
23
+
## What is the return value of `prompt`?
24
+
25
+
- If user typed something in the text input field that'll be the return value with data type String, even if user typed numbers. If user pressed "Cancel" button, then value'll be null.
0 commit comments