Contenu du cours
Module 1 — Discovering JavaScript
What JavaScript does, where to write your code, the console and a first script.
0/4
Module 2 — Language fundamentals
Variables and types, operators and conditions, then loops.
0/4
Module 3 — Functions and interactivity
Writing functions, responding to events and manipulating the DOM.
0/4
Module 4 — Going further
Arrays and objects, an introduction to APIs with fetch, and best practice.
0/4
JavaScript for beginners

Before writing any code, you need to know where to put it and how to test it. Good news: everything you need is already in your browser.

Where to put your JavaScript

  • In a separate file (recommended): a script.js file linked with the tag <script src="script.js"></script>.
  • Directly in the HTML: between <script> tags, usually just before the closing </body>.

The browser console

The console is the JavaScript developer’s tool of choice. Open it with the F12 key (or right-click → « Inspect »), then pick the Console tab. You can type code there and see the result straight away.

The most useful command is console.log(): it prints a value in the console. It is your best ally for understanding what your program is actually doing.

Key takeaway: the console (F12) is where you test code and print messages with console.log(). Keep it open while you work.

Prix indicatifs, convertis depuis l'euro