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
+5Lines changed: 5 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,7 +12,12 @@ 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
+
Answer: A pop up window displaying a text (Hello World!) will appear on the top and an OK button. It's a temporarily effect, but it required a user interaction to press OK before continuing.
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
20
What is the return value of `prompt`?
21
+
22
+
Answer: A pop up window appears with a title and a question (What is your name?), also an answering space area. At the right down of the window there are two buttons to the user, Ok and cancel.
23
+
After typing myName and press OK the console display the answer(myName).
0 commit comments