Loading lesson path
Concept visual
Start at both ends
Operator precedence describes the order in which operations are performed in an arithmetic expression. Multiplication ( * ) and division ( / ) have higher precedence than addition ( + ) and subtraction (
).
As in traditional mathematics, multiplication is done first:
let x = 100 + 50 * 3;When using parentheses, operations inside the parentheses are computed first:
let x = (100 + 50) * 3;Formula
Operations with the same precedence (like * and /) are computed from left to right:let x = 100 / 50 * 3;Expressions in parentheses are computed before the rest of the expression Function are executed before the result is used in the rest of the expression 18 ( )
Formula
(100 + 50) * 3ES2020 x ?. y 17 ()
17 new New with Arguments new Date("June 5,2022") 16 new
15 ++
15 --
14 ++
++i 14 --
--i
14 !
!(x==y) 14 ~
~x
14 +
+x 14
-x 14 typeof
14 void
14 delete Property Delete delete myCar.color
Multiplications and divisions are executed before additions and subtractions 13 **