Skip to content

Commit 7d2bbe6

Browse files
committed
Practice using chrome console
1 parent e574bb5 commit 7d2bbe6

1 file changed

Lines changed: 16 additions & 0 deletions

File tree

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

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,23 @@ In the Chrome console, invoke the function `alert` with one argument, the string
99

1010
What effect does calling the `alert` function have?
1111

12+
// Alert brings a pop up window out and says "Hello world" from the page. It also has a button called "OK"
13+
1214
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`.
1315

1416
What effect does calling the `prompt` function have?
1517
What is the return value of `prompt`?
18+
19+
// Opens a popup box with a text input. The value inside the () is what would display above the input.
20+
// The return value is myname?
21+
22+
This is the code I did.
23+
alert("Hello world")
24+
undefined
25+
prompt("What is your name")
26+
'Tylerluvslasagne'
27+
let myname = prompt("what is yur name")
28+
undefined
29+
console.log(myname)
30+
VM319:1 I LOVE MY EX
31+
undefined

0 commit comments

Comments
 (0)