Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Lernen Writing Your First JavaScript Code | Section
JavaScript Essentials for Backend

bookWriting Your First JavaScript Code

Swipe um das Menü anzuzeigen

Now that you can run JavaScript on your computer, it's time to write simple code.

JavaScript allows you to store values and perform operations with them.

For example:

123456
const a = 5; const b = 3; const sum = a + b; console.log(sum);
copy

Here, values are stored in variables. Then a calculation is performed, and the result is printed to the console.

You can also work with text:

123
const name = "John"; console.log(name);
copy

JavaScript executes code line by line. Each instruction runs in order, and you can use console.log to see the result at any step.

This is the foundation of programming: storing data, processing it, and producing an output.

question mark

What will this code output?

Wählen Sie die richtige Antwort aus

War alles klar?

Wie können wir es verbessern?

Danke für Ihr Feedback!

Abschnitt 1. Kapitel 3

Fragen Sie AI

expand

Fragen Sie AI

ChatGPT

Fragen Sie alles oder probieren Sie eine der vorgeschlagenen Fragen, um unser Gespräch zu beginnen

Abschnitt 1. Kapitel 3
some-alt