Skip to content

Commit eadc040

Browse files
Tried alerts and prompts on Chrome V8 Engine
1 parent 544f99d commit eadc040

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,14 @@ 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+
// This created a pop-up saying Hello world!
1112

1213
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`.
14+
// I did const myName = prompt("What is your name?")
15+
//console.log(myName)
1316

1417
What effect does calling the `prompt` function have?
18+
// Displayed a pop-up text box that I could enter Matthaus, which Javascript stored in the myName variable
19+
1520
What is the return value of `prompt`?
21+
Matthaus

0 commit comments

Comments
 (0)