You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Sprint-1/4-stretch-explore/chrome.md
+4Lines changed: 4 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,7 +12,11 @@ invoke the function `alert` with an input string of `"Hello world!"`;
12
12
13
13
What effect does calling the `alert` function have?
14
14
15
+
An alert box pops up in the browser window displaying my Hello World! message.
16
+
15
17
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`.
16
18
17
19
What effect does calling the `prompt` function have?
20
+
A prompt box pops up, displaying my question and an input field for me to answer.
[[Prototype]]: Object <-- prints out the console object with all its properties
10
39
11
40
Try also entering `typeof console`
41
+
'object' <-- data type of console
12
42
13
43
Answer the following questions:
14
44
15
45
What does `console` store?
46
+
The console object stores a series of functions that help with debugging code.
16
47
What does the syntax `console.log` or `console.assert` mean? In particular, what does the `.` mean?
48
+
The syntax console.log, called dot notation, is the simplest method to access the properties of an object. The "." identifies log as a property of console. Without it we would not be able to access the function, nor use it.
0 commit comments