็ธ้ค้็ฎๅญ๏ผ/๏ผ
Baseline
Widely available
This feature is well established and works across many devices and browser versions. Itโs been available across browsers since โจ2015ๅนด7ๆโฉ.
็ธ้ค้็ฎๅญ๏ผ/
๏ผๆฏ็จไพๅฐๅ
ฉๅๅผ้ฒ่ก็ธ้คไธฆๅๅพๅ
ถๅๆธใๅ
ถไธญๅทฆ้็ฎๅ
ๆฏ่ขซ้คๆธ๏ผๅณ้็ฎๅ
ๆฏ้คๆธใ
ๅ่ฉฆไธไธ
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
้คไปฅ้ถ
js
2.0 / 0; // Infinity
2.0 / 0.0; // Infinity, because 0.0 === 0
2.0 / -0.0; // -Infinity
่ฆ็ฏ
Specification |
---|
ECMAScriptยฎ 2026 Language Specification # sec-multiplicative-operators |
็่ฆฝๅจ็ธๅฎนๆง
Loadingโฆ