OneCompiler

JavaScript

Learn JavaScript from scratch on a real Node.js 22 runtime. Short lessons, from your first console.log to classes and async/await, each with an exercise you solve in the editor.

13 sections·60 items·Beginner
This course includes
  • 60 practice problems
  • 60 lessons
  • Free — runs in your browser, no setup

What you'll learn

Write and run complete JavaScript programs
Use let, const, template literals and JavaScript types
Compare values safely with === and use truthiness, || and ??
Control programs with if, switch, loops, break and continue
Write functions, arrow functions, callbacks and closures
Work with arrays: indexing, spread, sorting and references
Transform data with map, filter, reduce and chained methods
Store data with objects, destructuring, JSON, Map and Set
Build classes with methods, this and inheritance
Read stack traces and handle errors with try/catch and throw
Write async code with timers, promises, await and the event loop

Syllabus

About this course

JavaScript is the language of the web. Every web browser can run it, and it makes web pages interactive. With Node.js, JavaScript also runs outside the browser, for servers, tools and scripts.

This course teaches JavaScript from the very beginning, on a real Node.js 22 runtime. Each lesson is short and ends with an exercise in the editor. You write a real program, it runs on real input, and its output is checked for you. You start by printing one line. By the end, you will write functions and closures, transform lists with map and filter, store data in objects and JSON, build classes, and write async code with promises and await.

You do not need any programming experience.