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

(>) - JavaScript | MDN

MDN Web Docs

View in English Always switch to English

(>)

Baseline

20157

(>) true false

console.log(5 > 3);
// : true

console.log(3 > 3);
// : false

// 
console.log(3n > 5);
// : false

console.log("ab" > "aa");
// : true

js
x > y

2 x > y y < x x > y y x y < x x y

js
"a" > "b"; // false
"a" > "a"; // false
"a" > "3"; // true

js
"5" > 3; // true
"3" > 3; // false
"3" > 5; // false

"hello" > 5; // false
5 > "hello"; // false

"5" > 3n; // true
"3" > 5n; // false

js
5 > 3; // true
3 > 3; // false
3 > 5; // false

js
5n > 3; // true
3 > 5n; // false

nullundefinedNaN

js
true > false; // true
false > true; // false

true > 0; // true
true > 1; // false

null > 0; // false
1 > null; // true

undefined > 3; // false
3 > undefined; // false

3 > NaN; // false
NaN > 3; // false

ECMAScript 2027 LanguageSpecification
# sec-relational-operators


Web Proxy Viewer  |  New URL  |  Original Page