반응형

JavaScript Operator Precedence Values

ValueOperatorDescriptionExample
19( )Expression grouping(3 + 4)
    
18.Memberperson.name
18[]Memberperson["name"]
    
17()Function callmyFunction()
17newCreatenew Date()
    
16++Postfix Incrementi++
16--Postfix Decrementi--
    
15++Prefix Increment++i
15--Prefix Decrement--i
15!Logical not!(x==y)
15typeofTypetypeof x
    
14*Multiplication10 * 5
14/Division10 / 5
14%Modulo division10 % 5
14**Exponentiation10 ** 2
    
13+Addition10 + 5
13-Subtraction10 - 5
    
12<<Shift leftx << 2
12>>Shift rightx >> 2
12>>>Shift right (unsigned)x >>> 2
    
11<Less thanx < y 
11<=Less than or equalx <= y
11>Greater thanx > y
11>=Greater than or equalx >= y
    
10==Equalx == y
10===Strict equalx === y
10!=Unequalx != y
10!==Strict unequalx !== y
    
6&&Logical andx && y
5||Logical orx || y
    
3=Assignmentx = y
3+=Assignmentx += y
3-=Assignmentx -= y
3*=Assignmentx *= y
3%=Assignmentx %= y
3<<=Assignmentx <<= y
3>>=Assignmentx >>= y
3>>>=Assignmentx >>>= y
3&=Assignmentx &= y
3^=Assignmentx ^= y
3|=Assignmentx |= y

Pale red entries indicates experimental or proposed technology (ECMAScript 2016 or ES7)

Expressions in parentheses are fully computed before the value is used in the rest of the expression.





출처 :: https://www.w3schools.com/

반응형