A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://developer.mozilla.org/ja/docs/Web/JavaScript/Reference/Operators/Division_assignment below:

除算代入 (/=) - JavaScript | MDN

除算代入 (/=)

Baseline Widely available

除算代入演算子 (/=) は変数を右オペランドの値で除算し、結果をその変数に代入します。

試してみましょう
let a = 3;

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

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

a /= "hello";
console.log(a);
// Expected output: NaN
構文 例 除算代入の使用
// 以下の変数があり、すべての演算がこの順に実行されると想定する
//  bar = 5

bar /= 2; // 2.5
bar /= 2; // 1.25
bar /= 0; // Infinity
bar /= "foo"; // NaN
仕様書 ブラウザーの互換性 関連情報

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4