Skip to content
Algorithms for Beginners

Learn the basics

Ten short lessons that take you from no experience to ready for your first problem. Take them in order; each one builds on the last.

  1. What code is, and how to run it

    Write your first line of JavaScript and see what the computer does with it.

  2. Variables and types

    Give values a name, and learn the difference between numbers, text and true/false.

  3. Arrays

    Keep many values in order, and reach any one of them by its position.

  4. Strings

    Work with text one character at a time.

  5. Objects and Maps

    Look things up by name instead of by position.

  6. Decisions and loops

    Make your code choose what to do with if, and repeat steps with loops.

  7. Functions

    Package steps into a reusable recipe that takes inputs and returns an answer.

  8. Big O, in pictures

    Measure how much slower a solution gets as the input grows.

  9. Recursion

    Solve a problem by solving a smaller copy of the same problem.

  10. How to approach any problem

    A six-step method to go from a blank editor to a working answer.