--- title: 나누기 (/) slug: Web/JavaScript/Reference/Operators/Division tags: - JavaScript - Language feature - Operator - Reference browser-compat: javascript.operators.division translation_of: Web/JavaScript/Reference/Operators/Division ---
{{jsSidebar("Operators")}}

나누기 연산자(/)는 왼쪽 피연산자를 피제수, 오른쪽 피연산자를 제수로 하여 몫을 구합니다.

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

구문

x / y

예제

기본 나눗셈

1 / 2             // 0.5

Math.floor(3 / 2) // 1

1.0 / 2.0         // 0.5

0으로 나누기

2.0 / 0     // Infinity

2.0 / 0.0   // Infinity, 0.0 === 0이기 때문

2.0 / -0.0  // -Infinity

명세

{{Specifications}}

브라우저 호환성

{{Compat}}

같이 보기