Section 1 - Instruction

Remember the "Hello, World!" program we made last time?

Engagement Message

What was the main job of that console.log() command?

Section 2 - Instruction

The job of console.log() is to show something to you, the person running the program.

When a program shows information or results to the user, we call that output. So, console.log() creates output.

Engagement Message

With me so far?

Section 3 - Instruction

We've seen console.log() used with text inside quotes, like "Hello!". But console.log() can also create output for other types of information.

For example, you can print numbers like this:

console.log(42)

Engagement Message

What do you think this would show when you "run" it?

Section 4 - Instruction

Did you notice something different? When we print text like "Hello!", we put quotes around it. But when we print a number like 42, we usually don't.

This difference in how you write text versus numbers is part of JavaScript's syntax that we talked about.

Sign up
Join the 1M+ learners on CodeSignal
Be a part of our community of 1M+ users who develop and demonstrate their skills on CodeSignal