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

Advanced Operators

Some advanced operators can be used, such as:

  • Modulus (division remainder): x = y % 2

  • Increment: Given a = 5

    • c = a++, Results: c = 5 and a = 6

    • c = ++a, Results: c = 6 and a = 6

  • Decrement: Given a = 5

    • c = a--, Results: c = 5 and a = 4

    • c = --a, Results: c = 4 and a = 4

PreviousBasic OperatorsNextStrings

Last updated 4 years ago