Drag the edges to resize the window.

Code Editor
Introduction to JavaScript


The building blocks of JavaScript make up every program and line of JavaScript.

Just like a language has nouns, verbs, and prepositions, JavaScript has its own building blocks. Instead of calling them building blocks, however, developers call them data types.

There are three essential data types to know for now, and here is your first test of memorization (don't worry, we will practice):

  1. String: Any grouping of words or numbers surrounded by single quotes: ' ... ' or double quotes " ... ".
  2. Number: Any number, including numbers with decimals, without quotes: 4, 8, 1516, 23.42.
  3. Boolean: This is always one of two words. Either true or false, with no quotations.

Let's review: a string is any grouping of words, a number's a number, and a boolean is a ghostly halloween costume. Or no, that's false! It's either true or false.

Report a Bug
If you see a bug or any other issue with this page, please report it here.