Skip to content

Commit 4a031a0

Browse files
amended responses to prompt
1 parent 90e2625 commit 4a031a0

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

Sprint-1/4-stretch-explore/chrome.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,13 @@ What effect does calling the `prompt` function have?
1919
a pop up box appears saying thecharitych.com says What is your name
2020

2121
What is the return value of `prompt`?
22-
when I do console.log(answer); it returns the value myName
22+
23+
Using:
24+
const myName = prompt("What is your name?");
25+
console.log(myName);
26+
27+
If I click ok without entering my name the prompt goes off the screen and console.log returns undefined
28+
29+
If I click cancel without entering my name the promptgoes off the screen and console.log null undefined
30+
31+
If I put my name Hayriye in and click ok then it goes off the screen and console.log returns Hayriye

0 commit comments

Comments
 (0)