In this activity, we'll explore some additional concepts that you'll encounter in more depth later on in the course.
Open the Chrome devtools Console, type in console.log and then hit enter
What output do you get?
undefined/ f log() native code
Now enter just console in the Console, what output do you get back?
It shows that console stores an object with many functions inside it.
Try also entering typeof console
object
Answer the following questions:
What does console store
Console stores an object that contains tools for displaying information in the browser console, for example console.log() this displays messages or console.error() this displays errors.
What does the syntax console.log or console.assert mean? In particular, what does the . mean?
The . is called the dot operator, it is used to access properties or methods inside an object. An example is console.log()