JavaScript Part 3: Operators, Arithmetic, Assignment & Comparisons

javascript dev.to

An operator is a symbol that performs an operation on one or more values. Think of operators as the verbs of JavaScript — they make things happen. 1. JS Arithmetic Operators Arithmetic operators do math. Operator Name Example Result + Addition 10 + 5 15 - Subtraction 10 - 5 5 * Multiplication 10 * 5 50 / Division 10 / 5 2 % Modulus (remainder) 10 % 3 1 ** Exponentiation 2 ** 4 16 ++ Increment x++ adds 1 -- Decrement x-- subtracts 1 Basic examples

Read Full Tutorial open_in_new
arrow_back Back to Tutorials