A RetroSearch Logo

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

Search Query:

Showing content from https://developer.cdn.mozilla.net/ja/docs/Web/JavaScript/Reference/Operators/Greater_than_or_equal below:

大なりイコール (>=) - JavaScript | MDN

大なりイコール (>=)

Baseline Widely available

大なりイコール演算子 (>=) は、左辺のオペランドが右辺のオペランド以上の場合は true を返し、それ以外の場合は false を返します。

試してみましょう
console.log(5 >= 3);
// Expected output: true

console.log(3 >= 3);
// Expected output: true

// Compare bigint to number
console.log(3n >= 5);
// Expected output: false

console.log("ab" >= "aa");
// Expected output: true
構文 解説

オペランドは、抽象関係比較アルゴリズムを使用して比較されます。 このアルゴリズムの概要については、小なり演算子のドキュメントを参照して下さい。

例 文字列と文字列の比較
console.log("a" >= "b"); // false
console.log("a" >= "a"); // true
console.log("a" >= "3"); // true
文字列と数値の比較
console.log("5" >= 3); // true
console.log("3" >= 3); // true
console.log("3" >= 5); // false

console.log("hello" >= 5); // false
console.log(5 >= "hello"); // false
数値と数値の比較
console.log(5 >= 3); // true
console.log(3 >= 3); // true
console.log(3 >= 5); // false
Number と BigInt の比較
console.log(5n >= 3); // true
console.log(3 >= 3n); // true
console.log(3 >= 5n); // false
論理値、null、undefined、NaN の比較
console.log(true >= false); // true
console.log(true >= true); // true
console.log(false >= true); // false

console.log(true >= 0); // true
console.log(true >= 1); // true

console.log(null >= 0); // true
console.log(1 >= null); // true

console.log(undefined >= 3); // false
console.log(3 >= undefined); // false

console.log(3 >= NaN); // false
console.log(NaN >= 3); // false
仕様書 ブラウザーの互換性 関連情報

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