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
+6-5Lines changed: 6 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,11 +8,12 @@ Just like the Node REPL, you can input JavaScript code into the Console tab and
8
8
Let's try an example.
9
9
10
10
In the Chrome console,
11
-
invoke the function `alert` with an input string of `"Hello world!"`;
11
+
invoke the function `alert` with an input string of `"Hello world!"`; it displays hello world in a alert box
12
12
13
-
What effect does calling the `alert` function have?
13
+
What effect does calling the `alert` function have? the alert function forces browser to display a message or a warning.
14
14
15
15
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
-
17
-
What effect does calling the `prompt` function have?
18
-
What is the return value of `prompt`?
16
+
Prompt("what is your name?"), it pops-up a dialog box where I enter my name.
17
+
I saved my name in a variable myName and I called the prompt function, it gives my name.
18
+
What effect does calling the `prompt` function have? by prompt you can write/give your input or user can cancel it
19
+
What is the return value of `prompt`? name user have input or null in case of cancel.
0 commit comments