Learn JavaScript
  • Introduction
  • Basics
    • Comments
    • Variables
    • Types
    • Equality
  • Numbers
    • Creation
    • Basic Operators
    • Advanced Operators
  • Strings
    • Creation
    • Concatenation
    • Length
  • Conditional Logic
    • If
    • Else
    • Comparators
    • Concatenate
  • Arrays
    • Indices
    • Length
  • Loops
    • For
    • While
    • Do...While
  • Functions
    • Declare
    • Higher order
  • Objects
    • Creation
    • Properties
    • Mutable
    • Reference
    • Prototype
    • Delete
    • Enumeration
    • Global footprint
Powered by GitBook
On this page
  1. Numbers

Basic Operators

You can apply mathematic operations to numbers using some basic operators like:

  • Addition: c = a + b

  • Subtraction: c = a - b

  • Multiplication: c = a * b

  • Division: c = a / b

You can use parentheses just like in math to separate and group expressions: c = (a / b) + d

PreviousCreationNextAdvanced Operators

Last updated 4 years ago