Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Learn Writing our first code | Introduction
Introduction to JavaScript

book
Writing our first code

The very first exercise every programmer goes through is the printing Hello world! message to the console. Let's do it with JavaScript: you should use the console.log() statement like in the example:

python
console.log('Hello world!');

Try running this code and you will see a sentence in parentheses printed in the console.

You can put any other message (inside the quotes):

python
console.log('What a good idea!')
Task

Swipe to start coding

Print another one message. Use the console.log() to print this message "I am learning JavaScript"

Solution

console.log("I am learning JavaScript")

Everything was clear?

How can we improve it?

Thanks for your feedback!

Section 1. Chapter 1

toggle bottom row
some-alt