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

Stryg for at vise menuen

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:

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):

Opgave

Swipe to start coding

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

Løsning

Switch to desktopSkift til skrivebord for at øve i den virkelige verdenFortsæt der, hvor du er, med en af nedenstående muligheder
Var alt klart?

Hvordan kan vi forbedre det?

Tak for dine kommentarer!

Sektion 1. Kapitel 1
single

single

Spørg AI

expand

Spørg AI

ChatGPT

Spørg om hvad som helst eller prøv et af de foreslåede spørgsmål for at starte vores chat

close

Awesome!

Completion rate improved to 2

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:

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):

Opgave

Swipe to start coding

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

Løsning

Switch to desktopSkift til skrivebord for at øve i den virkelige verdenFortsæt der, hvor du er, med en af nedenstående muligheder
Var alt klart?

Hvordan kan vi forbedre det?

Tak for dine kommentarer!

close

Awesome!

Completion rate improved to 2

Stryg for at vise menuen

some-alt