[ Web Proxy ]
URL:
Viewing: https://developer.mozilla.org/ko/docs/Web/JavaScript/Reference/Operators/Division [Back]  [Original]

(/) - JavaScript | MDN

This page was translated from English by the community. Learn more and join the MDN Web Docs community.

View in English Always switch to English

(/)

Baseline Widely available

This feature is well established and works across many devices and browser versions. Its been available across browsers since 2015 7.

(/) , .

In this article

console.log(12 / 2);
// Expected output: 6

console.log(3 / 2);
// Expected output: 1.5

console.log(6 / "3");
// Expected output: 2

console.log(2 / 0);
// Expected output: Infinity

js
x / y;

js
1 / 2; // 0.5

Math.floor(3 / 2); // 1

1.0 / 2.0; // 0.5

0

js
2.0 / 0; // Infinity

2.0 / 0.0; // Infinity, 0.0 === 0 

2.0 / -0.0; // -Infinity

Specification
ECMAScript 2027 LanguageSpecification
# sec-multiplicative-operators


Web Proxy Viewer  |  New URL  |  Original Page