Command Shift

Operators

Learning Objectives

  • Understand what is meant by the term operator
  • Know what the three main types of operators are in JavaScript

Operators

We now know about some of the different data types we have available in JavaScript:

  • Strings: 'Hello'
  • Numbers: 483
  • Booleans: true and false

We also know how to save values in our program by using variables.

But how can we use these values to actually make our programs do interesting and useful things?

One of the most important ways is through the use of operators. These operators take one or more values, and transform them into a new value.

We've already seen a few examples of an operator in the previous lessons - the equality operator (===), addition operator (+) and the multiplication operator (*) - and you will be familiar with the ideas behind many of the other operators too.

All of the operators in JavaScript can be split into three main families. In the coming lessons, we'll take a look at each of these three families - Comparison Operators, Arithmetic Operators and Logical Operators

On this page