Learnr

Learn JavaScript

Go from your first line of code to building interactive web pages.

or browse all courses.

Free to start. Built from a single prompt. No credit card.

JavaScript runs almost everything you touch on the web. Learnr builds you a personalized JavaScript course from a single prompt, then teaches it through short, interactive lessons that adapt as you write more code.

What you'll learn

  • Work confidently with variables, data types, and operators
  • Write reusable functions and control program flow with loops and conditionals
  • Manipulate arrays and objects to model real data
  • Read and change web pages through the DOM
  • Handle asynchronous code with promises and async/await

What's inside your JavaScript course

A sample path Learnr builds for JavaScript. Your real course adapts to your goal and level.

  • 1. How JavaScript runs in the browser
  • 2. Variables, types, and expressions
  • 3. Functions, scope, and control flow
  • 4. Arrays, objects, and iteration
  • 5. The DOM and responding to events
  • 6. Fetching data and working with async code

How Learnr builds your course

Type your topic

Tell Learnr you want to learn javascript, or get as specific as you like.

Get a personalized course

Learnr instantly builds a full JavaScript course tailored to your goal and skill level.

Learn and level up

Move through bite-sized lessons and interactive practice, earning XP and keeping your streak.

JavaScript questions, answered

Do I need to know HTML and CSS before learning JavaScript?

A little helps, but not much. Learnr introduces the HTML and CSS you need as JavaScript concepts come up, so you can start from scratch.

How long does it take to learn JavaScript?

You can write useful scripts within a few weeks of short daily practice, though mastering the language is an ongoing process.

Explore more courses

Ready to learn javascript?

Start your free, personalized JavaScript course in seconds. .