Your Coding Playground & First Program

Set up your tools, say hello to the world, and learn the grammar of JavaScript. Nine short pages from Kindergarten of Kiddie School, about 18 minutes of reading in all.

What you’ll learn

  • The three tools every JS coder uses
  • How to open the browser console
  • How to write and run your first program
  • How to put JavaScript in a web page
  • How to run JavaScript with Node.js
  • Statements, semicolons, case and whitespace
  • How to write comments
  • How to talk to users with alert and prompt

The pages

Nine pages, about 18 minutes.

  1. Your Toolbox Every craftsperson needs tools. A carpenter has a hammer and a saw. A chef has knives and pots. A JavaScript…
  2. Meet the Console Okay, here's where the fun starts. Your web browser has a secret room hidden inside it, built just for developers…
  3. Your First Program: Hello, World! There's a tradition in programming that goes back to the 1970s. When you learn a new language, the very first program…
  4. Writing JavaScript in a File The console is great for experiments, but anything you type there disappears when you close the browser. Real programs…
  5. Running JavaScript with Node.js Sometimes you just want to run some JavaScript without bothering with an HTML file. That's what Node.js is for. Go to…
  6. The Grammar of JavaScript Every language has grammar rules. In English, sentences start with a capital letter and end with a full stop…
  7. Comments: Notes to Your Future Self Sometimes you want to write a note in your code that's meant for humans, not the computer. That's what comments are…
  8. Talking to the User: alert, prompt and confirm So far, our programs have only talked to the console, which normal people never look at. (Normal people don't even…
  9. Recap The key ideas of Kindergarten, Your first JavaScript program, on one page. You need three free tools: a web browser, a…

Reading is step one

CurlyScript turns these notes into a game: short questions, an explanation after every answer, and a test at the end of each grade. Free, with nothing to sign up for.

Start learning