식 및 연산자

이 장은 JavaScript의 모든 연산자, 식 및 키워드를 나열합니다.

항목별 식 및 연산자

알파벳순 목록은 왼쪽 사이드바를 보세요.

기본 식

기본 키워드 및 JavaScript의 일반 식.

this

this 키워드는 실행 문맥의 특별한 속성을 가리킵니다.

function

function 키워드는 함수를 정의합니다.

class

class 키워드는 클래스를 정의합니다.

function*

function* 키워드는 생성기 함수 식을 정의합니다.

yield

생성기 함수를 일시정지 및 재개합니다.

yield*

다른 생성기 함수 또는 순회가능 객체로 위임합니다.

async function

async function은 비동기 함수 표현식을 정의합니다.

await

비동기 함수를 일시 중지했다가 다시 시작하고 promise의 resolution/rejection을 기다립니다.

[]

배열 초기자 및 리터럴 구문.

{}

객체 초기자 및 리터럴 구문.

/ab+c/i

정규식 리터럴 구문.

( )

그룹 연산자.

좌변 식

좌변값은 할당 대상입니다.

Property accessors

속성 접근자는 객체의 속성 또는 메서드에 대한 접근 방법을 제공합니다. (object.property, object["property"])

new

new 연산자는 생성자의 인스턴스를 만듭니다.

new.target

생성자 문맥에서, new.targetnew에 의해 호출된 생성자를 말합니다.

super

super 키워드는 부모 생성자를 호출합니다.

...obj

전개 연산자는 (함수 호출 시) 매개변수 여럿이나, (배열 리터럴에서) 다수의 요소를 필요로 하는 곳에서 표현식을 확장합니다.

증가 및 감소

접두/접미 증감 연산자입니다.

A++

접미 증가 연산자.

A--

접미 감소 연산자.

++A

접두 증가 연산자.

--A

접두 감소 연산자.

단항 연산자

단항 연산은 피연산자가 하나뿐인 연산입니다.

delete

delete 연산자는 객체에서 속성을 지웁니다.

void

void 연산자는 식의 반환값을 버립니다.

typeof

typeof 연산자는 주어진 객체의 형을 판별합니다.

+

단항 더하기 연산자는 피연산자를 숫자로 변환합니다.

-

단항 부정 연산자는 피연산자를 숫자로 변환한 뒤 부호를 바꿉니다.

~

비트 NOT 연산자.

!

논리 NOT 연산자.

산술 연산자

산술 연산자는 피연산자로 숫자 값(리터럴이나 변수)을 취하고 숫자 값 하나를 반환합니다.

+

더하기 연산자.

-

빼기 연산자.

/

나누기 연산자.

*

곱하기 연산자.

%

나머지 연산자.

**

거듭제곱 연산자.

관계 연산자

비교 연산자는 피연산자를 비교하고, 비교가 참인지 여부를 나타내는 Boolean 값을 반환합니다.

in

in 연산자는 객체에 주어진 속성이 있는지를 결정합니다.

instanceof

instanceof 연산자는 객체가 다른 객체의 인스턴스인지 판별합니다.

<

작음 연산자.

>

큼 연산자.

<=

작거나 같음 연산자.

>=

크거나 같음 연산자.

참고: => 는 연산자가 아니고, 화살표 함수의 표기법입니다.

같음 연산자

같음 연산자의 평가 결과는 항상 Boolean 형으로 비교가 참인지 나타냅니다.

==

동등 연산자.

!=

부등 연산자.

===

일치 연산자.

!==

불일치 연산자.

비트 시프트 연산자

피연산자의 모든 비트를 시프트하는 연산.

<<

비트 좌로 시프트 연산자.

>>

비트 우로 시프트 연산자.

>>>

비트 부호 없는 우로 시프트 연산자.

이진 비트 연산자

비트 연산자는 피연산자를 32비트 집합(0과 1)으로 다루고 표준 JavaScript 숫자 값을 반환합니다.

&

비트 AND.

|

비트 OR.

^

비트 XOR.

이진 논리 연산자

논리 연산자는 보통 사용될 때 불리언(논리) 값으로 사용되고, 불리언 값을 반환합니다.

&&

논리 AND.

||

논리 OR.

??

Nullish 통합 연산자.

조건부(삼항) 연산자

(condition ? ifTrue : ifFalse)

조건부 연산자는 조건의 논리값에 따라 두 값 중 하나를 반환합니다.

선택적 연결 연산자

?.

선택적 연결 연산자는 참조가 nullish (null 또는 undefined) 인 경우 오류를 발생시키는 대신 undefined를 반환합니다.

할당 연산자

할당 연산자는 값을 그 우변 피연산자의 값에 따라 좌변 피연산자에 할당합니다.

=

할당 연산자.

*=

곱셈 할당.

**=

거듭제곱 할당.

/=

나눗셈 할당.

%=

나머지 할당.

+=

덧셈 할당.

-=

뺄셈 할당

<<=

좌로 이동 할당.

>>=

우로 이동 할당.

>>>=

부호 없는 우로 이동 할당.

&=

비트 AND 할당.

^=

비트 XOR 할당.

|=

비트 OR 할당.

&&=

논리적 AND 할당.

||=

논리적 OR 할당.

??=

논리적 nullish 할당.

[a, b] = [1, 2] {a, b} = {a:1, b:2}

구조 분해 할당은 배열 또는 객체의 속성을 배열 또는 객체 리터럴과 비슷해 보이는 구문을 사용하여 변수에 할당할 수 있게 합니다.

쉼표 연산자

,

쉼표 연산자는 여러 식을 단문으로 평가되게 하고 마지막 식의 결과를 반환합니다.

명세

Specification
ECMAScript® 2025 Language Specification
# sec-new-operator
ECMAScript® 2025 Language Specification
# sec-unary-minus-operator
ECMAScript® 2025 Language Specification
# sec-conditional-operator
ECMAScript® 2025 Language Specification
# sec-assignment-operators
ECMAScript® 2025 Language Specification
# sec-logical-not-operator
ECMAScript® 2025 Language Specification
# sec-import-calls
ECMAScript® 2025 Language Specification
# prod-OptionalExpression
ECMAScript® 2025 Language Specification
# prod-ArgumentList
ECMAScript® 2025 Language Specification
# sec-signed-right-shift-operator
HTML
# import-meta-resolve
ECMAScript® 2025 Language Specification
# prod-PropertyDefinition
ECMAScript® 2025 Language Specification
# sec-class-definitions
ECMAScript® 2025 Language Specification
# sec-unary-plus-operator
ECMAScript® 2025 Language Specification
# prod-LogicalORExpression
ECMAScript® 2025 Language Specification
# sec-exp-operator
ECMAScript® 2025 Language Specification
# sec-unsigned-right-shift-operator
ECMAScript® 2025 Language Specification
# prod-YieldExpression
ECMAScript® 2025 Language Specification
# prod-BitwiseANDExpression
ECMAScript® 2025 Language Specification
# sec-relational-operators
ECMAScript® 2025 Language Specification
# sec-grouping-operator
ECMAScript® 2025 Language Specification
# sec-equality-operators
ECMAScript® 2025 Language Specification
# sec-bitwise-not-operator
ECMAScript® 2025 Language Specification
# sec-left-shift-operator
ECMAScript® 2025 Language Specification
# prod-SpreadElement
ECMAScript® 2025 Language Specification
# sec-void-operator
ECMAScript® 2025 Language Specification
# sec-addition-operator-plus
ECMAScript® 2025 Language Specification
# prod-LogicalANDExpression
ECMAScript® 2025 Language Specification
# sec-postfix-increment-operator
ECMAScript® 2025 Language Specification
# prod-BitwiseORExpression
ECMAScript® 2025 Language Specification
# sec-object-initializer
ECMAScript® 2025 Language Specification
# sec-comma-operator
ECMAScript® 2025 Language Specification
# prod-BitwiseXORExpression
ECMAScript® 2025 Language Specification
# sec-generator-function-definitions
ECMAScript® 2025 Language Specification
# sec-property-accessors
ECMAScript® 2025 Language Specification
# sec-delete-operator
ECMAScript® 2025 Language Specification
# sec-null-value
ECMAScript® 2025 Language Specification
# prod-CoalesceExpression
ECMAScript® 2025 Language Specification
# sec-super-keyword
ECMAScript® 2025 Language Specification
# sec-this-keyword
ECMAScript® 2025 Language Specification
# sec-typeof-operator
ECMAScript® 2025 Language Specification
# prod-ImportMeta
ECMAScript® 2025 Language Specification
# sec-function-definitions
ECMAScript® 2025 Language Specification
# sec-async-function-definitions
ECMAScript® 2025 Language Specification
# sec-built-in-function-objects
ECMAScript® 2025 Language Specification
# sec-subtraction-operator-minus
ECMAScript® 2025 Language Specification
# sec-postfix-decrement-operator
ECMAScript® 2025 Language Specification
# sec-async-generator-function-definitions
ECMAScript® 2025 Language Specification
# sec-generator-function-definitions-runtime-semantics-evaluation
ECMAScript® 2025 Language Specification
# sec-multiplicative-operators
ECMAScript® 2025 Language Specification
# sec-destructuring-assignment
ECMAScript® 2025 Language Specification
# sec-destructuring-binding-patterns

브라우저 호환성

Report problems with this compatibility data on GitHub
desktopmobileserver
Chrome
Edge
Firefox
Opera
Safari
Chrome Android
Firefox for Android
Opera Android
Safari on iOS
Samsung Internet
WebView Android
WebView on iOS
Deno
Node.js
Addition (+)
Addition assignment (x += y)
Assignment (x = y)
async function expression
async function* expression
await
Use at module top level
Bitwise AND (a & b)
Bitwise AND assignment (x &= y)
Bitwise NOT (~a)
Bitwise OR (a | b)
Bitwise OR assignment (x |= y)
Bitwise XOR (a ^ b)
Bitwise XOR assignment (x ^= y)
class
Comma operator
Conditional operator (c ? t : f)
Decrement (--)
delete
Destructuring assignment
Computed property names
Rest in arrays
Rest in objects
Division (/)
Division assignment (x /= y)
Equality (a == b)
Exponentiation (**)
Exponentiation assignment (x **= y)
function expression
Trailing comma in parameters
function* expression
Trailing comma in parameters
Greater than (a > b)
Greater than or equal (a >= b)
Grouping operator ()
import
The options parameter
Non-standard
Available in workers
import.meta
import.meta.resolve
in
Increment (++)
Inequality (a != b)
instanceof
Bitwise left shift (a << b)
Left shift assignment (x <<= y)
Less than (a < b)
Less than or equal (a <= b)
Logical AND (&&)
Logical AND assignment (x &&= y)
Logical NOT (!)
Logical OR (||)
Logical OR assignment (x ||= y)
Multiplication (*)
Multiplication assignment (x *= y)
new
new.target
null
Nullish coalescing operator (??)
Nullish coalescing assignment (x ??= y)
Object initializer
Computed property names
Shorthand method names
Shorthand property names
Spread properties
Optional chaining operator (?.)
Property accessors
Remainder (%)
Remainder assignment (x %= y)
Bitwise right shift (a >> b)
Right shift assignment (x >>= y)
Spread syntax (...)
Spread in array literals
Spread in function calls
Spread in object literals
Strict equality (a === b)
Strict inequality (a !== b)
Subtraction (-)
Subtraction assignment (x -= y)
super
this
typeof
Unary negation (-)
Unary plus (+)
Bitwise unsigned right shift (a >>> b)
Unsigned right shift assignment (x >>>= y)
void
yield
yield*

Legend

Tip: you can click/tap on a cell for more information.

Full support
Full support
Partial support
Partial support
No support
No support
Non-standard. Check cross-browser support before using.
See implementation notes.
Has more compatibility info.

같이 보기