--- title: 빼기 (-) slug: Web/JavaScript/Reference/Operators/Subtraction tags: - JavaScript - Language feature - Operator - Reference browser-compat: javascript.operators.subtraction translation_of: Web/JavaScript/Reference/Operators/Subtraction ---
{{jsSidebar("Operators")}}

빼기 연산자(-)는 두 연산자의 차이를 구합니다.

{{EmbedInteractiveExample("pages/js/expressions-subtraction.html")}}

구문

x - y

예제

뺄셈

5 - 3  // 2
3 - 5  // -2

숫자가 아닌 경우

'foo' - 3 // NaN

명세

{{Specifications}}

브라우저 호환성

{{Compat}}

같이 보기