aboutsummaryrefslogtreecommitdiff
path: root/files/ja/web/javascript/reference/operators/greater_than
diff options
context:
space:
mode:
authorPeter Bengtsson <mail@peterbe.com>2020-12-08 14:40:17 -0500
committerPeter Bengtsson <mail@peterbe.com>2020-12-08 14:40:17 -0500
commit33058f2b292b3a581333bdfb21b8f671898c5060 (patch)
tree51c3e392513ec574331b2d3f85c394445ea803c6 /files/ja/web/javascript/reference/operators/greater_than
parent8b66d724f7caf0157093fb09cfec8fbd0c6ad50a (diff)
downloadtranslated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.gz
translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.bz2
translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.zip
initial commit
Diffstat (limited to 'files/ja/web/javascript/reference/operators/greater_than')
-rw-r--r--files/ja/web/javascript/reference/operators/greater_than/index.html100
1 files changed, 100 insertions, 0 deletions
diff --git a/files/ja/web/javascript/reference/operators/greater_than/index.html b/files/ja/web/javascript/reference/operators/greater_than/index.html
new file mode 100644
index 0000000000..247f76e0cb
--- /dev/null
+++ b/files/ja/web/javascript/reference/operators/greater_than/index.html
@@ -0,0 +1,100 @@
+---
+title: 大なり (>)
+slug: Web/JavaScript/Reference/Operators/Greater_than
+tags:
+ - JavaScript
+ - Language feature
+ - Operator
+ - Reference
+translation_of: Web/JavaScript/Reference/Operators/Greater_than
+---
+<div>{{jsSidebar("Operators")}}</div>
+
+<p>大なり演算子 (<code>&gt;</code>) は、左辺のオペランドが右辺のオペランドより大きい場合は <code>true</code> を返し、それ以外の場合は <code>false</code> を返します。</p>
+
+<div>{{EmbedInteractiveExample("pages/js/expressions-greater-than.html")}}</div>
+
+
+
+<h2 id="構文">構文</h2>
+
+<pre class="syntaxbox notranslate">x &gt; y</pre>
+
+<h2 id="解説">解説</h2>
+
+<p>オペランドは、 <a class="external external-icon" href="https://tc39.es/ecma262/#sec-abstract-relational-comparison" rel="noopener">抽象関係比較</a> アルゴリズムを使用して比較されます。このアルゴリズムの概要については、 <a href="/en-US/docs/Web/JavaScript/Reference/Operators/Less_than">小なり</a> 演算子のドキュメントを参照して下さい。</p>
+
+<h2 id="例">例</h2>
+
+<h3 id="文字列と文字列の比較">文字列と文字列の比較</h3>
+
+<pre class="brush: js notranslate">console.log("a" &gt; "b"); // false
+console.log("a" &gt; "a"); // false
+console.log("a" &gt; "3"); // true</pre>
+
+<h3 id="文字列と数値の比較">文字列と数値の比較</h3>
+
+<pre class="brush: js notranslate">console.log("5" &gt; 3); // true
+console.log("3" &gt; 3); // false
+console.log("3" &gt; 5); // false
+
+console.log("hello" &gt; 5); // false
+console.log(5 &gt; "hello"); // false
+
+console.log("5" &gt; 3n); // true
+console.log("3" &gt; 5n); // false</pre>
+
+<h3 id="数値と数値の比較">数値と数値の比較</h3>
+
+<pre class="brush: js notranslate">console.log(5 &gt; 3); // true
+console.log(3 &gt; 3); // false
+console.log(3 &gt; 5); // false</pre>
+
+<h3 id="数値と_BigInt_の比較">数値と BigInt の比較</h3>
+
+<pre class="brush: js notranslate">console.log(5n &gt; 3); // true
+console.log(3 &gt; 5n); // false</pre>
+
+<h3 id="ブール値、_null_、_undefined_、_NaN_の比較">ブール値、 null 、 undefined 、 NaN の比較</h3>
+
+<pre class="brush: js notranslate">console.log(true &gt; false); // true
+console.log(false &gt; true); // false
+
+console.log(true &gt; 0); // true
+console.log(true &gt; 1); // false
+
+console.log(null &gt; 0); // false
+console.log(1 &gt; null); // true
+
+console.log(undefined &gt; 3); // false
+console.log(3 &gt; undefined); // false
+
+console.log(3 &gt; NaN); // false
+console.log(NaN &gt; 3); // false</pre>
+
+<h2 id="仕様">仕様</h2>
+
+<table class="standard-table">
+ <tbody>
+ <tr>
+ <th scope="col">仕様</th>
+ </tr>
+ <tr>
+ <td>{{SpecName('ESDraft', '#sec-relational-operators', 'Relational operators')}}</td>
+ </tr>
+ </tbody>
+</table>
+
+<h2 id="ブラウザーの互換性">ブラウザーの互換性</h2>
+
+
+
+<p>{{Compat("javascript.operators.greater_than")}}</p>
+
+<h2 id="関連項目">関連項目</h2>
+
+<ul>
+ <li><a href="/en-US/docs/Web/JavaScript/Reference/Operators/Greater_than_or_equal">Greater than or equal operator</a></li>
+ <li><a href="/en-US/docs/Web/JavaScript/Reference/Operators/Less_than">Less than operator</a></li>
+ <li><a href="/en-US/docs/Web/JavaScript/Reference/Operators/Less_than_or_equal">Less than or equal operator</a></li>
+</ul>