Skip to content

Commit 56ee0b7

Browse files
Answered question on the effect of prompt function in chrome.md file
1 parent 771b9ec commit 56ee0b7

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,6 @@ What effect does calling the `alert` function have?
1717
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`.
1818

1919
What effect does calling the `prompt` function have?
20+
//The effect is similar to the alert one a small modal dialog box pops up with the addition of a text input field and two buttons for 'OK' and 'Cancel', it displays the question What is your name?
2021
What is the return value of `prompt`?
22+
//The return value of the 'prompt' depends on what action the client did , whci is one of two things based on the client actions.it will return whatever the client typed into the text field as string and click 'OK' and this will be stored in the variable myName, and can be verified by typing myName into the console and hitting ENTER.However if the user clicks cancel , it returns null.

0 commit comments

Comments
 (0)