Values

There are a variety of types of values you can use in JavaScript. The major ones are:

  • Numbers: any number such as 0,4,5 or even 1.4526727
  • Booleans: a variable that has either a true or false value.
  • Strings: characters, words, really any text as long as you have it in quotes or backticks. For example, "apple", "lab", and "Applab 2019 Fall" are strings.
  • Objects: A collection of related data.
  • Arrays: A list of elements (values).
  • Functions: These are code blocks written to perform a task.

We’ll cover these all in depth, but for today, numbers and strings are the primary ones. So don’t fret if you don’t understand the more complicated types else in the list above!