File tree Expand file tree Collapse file tree
Sprint-2/4-stretch-explore Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -13,3 +13,7 @@ Now try invoking the function `prompt` with a string input of `"What is your nam
1313
1414What effect does calling the ` prompt ` function have?
1515What is the return value of ` prompt ` ?
16+ ## Answers
17+ - alert("Hello world!") shows a browser alert dialog with that message.
18+ - prompt("What is your name?") shows an input dialog asking for a name.
19+ - prompt returns the typed string if OK is pressed, or null if Cancel is pressed.
Original file line number Diff line number Diff line change @@ -14,3 +14,9 @@ Answer the following questions:
1414
1515What does ` console ` store?
1616What does the syntax ` console.log ` or ` console.assert ` mean? In particular, what does the ` . ` mean?
17+ ## Answers
18+ - console.log is a function (native code).
19+ - console is an object containing logging methods.
20+ - typeof console is "object".
21+ - console stores the browser/devtools console API object.
22+ - The dot ` . ` means property access: console.log is the log property (a function) on the console object.
You can’t perform that action at this time.
0 commit comments