Sikau

JavaScript · Day 1 · about 20 min

What is programming?

Instructions for a very literal helper.

Welcome

Every app you use — maps, messages, online banking — is a long list of instructions that someone wrote. Today you write your first one.

You don't need to be a "maths person" or know anything about computers. If you can follow a recipe, you can learn this.

Each lesson takes about 20–30 minutes. Go at your own pace — nothing here is timed, and you can't break anything.

A very literal helper

A program is a list of instructions for a computer. Programming is writing those instructions.

Computers are extremely fast, but they do *exactly* what you say — nothing more, nothing less. They never guess what you meant.

The recipe: Imagine giving someone a recipe for tea who has never seen a kitchen. "Make tea" won't work. You'd write: fill the pot with water, put it on the stove, turn on the gas, wait until it boils, add tea leaves… A program is the same: small, clear steps, in the right order.

The language we'll use to write these steps is JavaScript. It's the language of the web — it runs inside every browser, including the one you're using right now.

The rest of this lesson

  • Your first line of codeexplain
  • How the computer reads your programexplain
  • Predict the outputpredict
  • Put the steps in orderorder
  • Your turnwrite code
  • Three stepswrite code
  • Challengechallenge
  • Badge quizquiz
  • What you learnedrecap

Continue this lesson free — run real code in your browser

Continue with Google

See all 68 lessons of JavaScript