Skip to content

Commit 91b6ea9

Browse files
committed
explored using the console in chrome and answered questions
1 parent fc5d38c commit 91b6ea9

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

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

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,11 @@ 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-
11+
it opens a pop up message with the string I passed it (Hello world!)
1212
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+
const myName = prompt("What is your name?")
14+
console.log(myName)
15+
output: Mars
1316

14-
What effect does calling the `prompt` function have?
15-
What is the return value of `prompt`?
17+
What effect does calling the `prompt` function have? It opens a pop up box asking the using to enter something in a text box here it asked what my name was.
18+
What is the return value of `prompt`? it returns the information entered into the text box as a string so as i entered my name it would return "Mars" and store it in the variable Myname.

0 commit comments

Comments
 (0)