Skip to content

Commit d0373f8

Browse files
committed
practising Console and meanings
1 parent 3afc2c9 commit d0373f8

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

Sprint-1/explore/chrome.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,12 @@ In the Chrome console,
1111
invoke the function `alert` with an input string of `"Hello world!"`;
1212

1313
What effect does calling the `alert` function have?
14+
it show a pop up on the page
1415

1516
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`.
1617

1718
What effect does calling the `prompt` function have?
19+
input appears on the screen with a text input
20+
1821
What is the return value of `prompt`?
22+
the name it is write on the screen

Sprint-1/explore/objects.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,21 @@ What output do you get?
99
Now enter just `console` in the Console, what output do you get back?
1010

1111
Try also entering `typeof console`
12+
ƒ 'object'
1213

1314
Answer the following questions:
1415

1516
What does `console` store?
17+
This means that console is an object in JavaScript, specifically a built-in global object in web browser.
18+
console is an object that stores a collection of methods for interacting with the web browser's debugging console. It is primarily used to output information (like messages, errors, or logs) to the console for developers to inspect during runtime.
19+
20+
Some common methods of the console object include:
21+
22+
console.log(): To log information to the console.
23+
console.error(): To output error messages.
24+
console.assert(): To test expressions and output an error message if the expression is false.
25+
console.table(): To display data in a table format in the console.
26+
1627
What does the syntax `console.log` or `console.assert` mean? In particular, what does the `.` mean?
28+
29+
The . allows you to access methods (like log and assert) or properties within the console object, enabling you to interact with it and perform different actions (like logging, checking conditions, etc.)

0 commit comments

Comments
 (0)