diff options
author | Masahiro FUJIMOTO <mfujimot@gmail.com> | 2021-09-23 11:16:18 +0900 |
---|---|---|
committer | Masahiro FUJIMOTO <mfujimot@gmail.com> | 2021-10-04 10:47:10 +0900 |
commit | 610486237ca88f4eb658d0a286d69587e369b6cc (patch) | |
tree | 48e601a73cee9114b0eea8b8566056d4585cb982 /files/ja/web/javascript/reference/operators/index.html | |
parent | a6d4c4789280af14446cf7e489c7ea383aa7f462 (diff) | |
download | translated-content-610486237ca88f4eb658d0a286d69587e369b6cc.tar.gz translated-content-610486237ca88f4eb658d0a286d69587e369b6cc.tar.bz2 translated-content-610486237ca88f4eb658d0a286d69587e369b6cc.zip |
Web/JavaScript/Reference/Operators の変換準備
Diffstat (limited to 'files/ja/web/javascript/reference/operators/index.html')
-rw-r--r-- | files/ja/web/javascript/reference/operators/index.html | 297 |
1 files changed, 0 insertions, 297 deletions
diff --git a/files/ja/web/javascript/reference/operators/index.html b/files/ja/web/javascript/reference/operators/index.html deleted file mode 100644 index aa1fde203b..0000000000 --- a/files/ja/web/javascript/reference/operators/index.html +++ /dev/null @@ -1,297 +0,0 @@ ---- -title: 式と演算子 -slug: Web/JavaScript/Reference/Operators -tags: - - JavaScript - - Landing page - - Operators - - Overview - - Reference - - 概要 - - 演算子 -translation_of: Web/JavaScript/Reference/Operators ---- -<div>{{JSSidebar("Operators")}}</div> - -<p class="summary">この節では、JavaScript 言語のすべての演算子、式、キーワードについて記述しています。</p> - -<h2 id="Expressions_and_operators_by_category">式と演算子 (カテゴリー別)</h2> - -<p>アルファベット順の一覧は左側のサイドバーをご覧ください。</p> - -<h3 id="Primary_expressions">基本式</h3> - -<p>JavaScript の基本的なキーワードと一般的な式です。</p> - -<dl> - <dt>{{JSxRef("Operators/this", "this")}}</dt> - <dd><code>this</code> キーワードは関数の実行コンテキストを参照します。</dd> - <dt>{{JSxRef("Operators/function", "function")}}</dt> - <dd><code>function</code> キーワードは関数式を定義します。</dd> - <dt>{{JSxRef("Operators/class", "class")}}</dt> - <dd><code>class</code> キーワードはクラス式を定義します。</dd> - <dt>{{JSxRef("Operators/function*", "function*")}}</dt> - <dd><code>function*</code> キーワードはジェネレーター関数式を定義します。</dd> - <dt>{{JSxRef("Operators/yield", "yield")}}</dt> - <dd>ジェネレーター関数の一時停止と再開を行います。</dd> - <dt>{{JSxRef("Operators/yield*", "yield*")}}</dt> - <dd>別のジェネレーター関数または反復可能オブジェクトを代行します。</dd> - <dt>{{JSxRef("Operators/async_function", "async function")}}</dt> - <dd><code>async function</code> は非同期の関数式を定義します。</dd> - <dt>{{JSxRef("Operators/await", "await")}}</dt> - <dd>非同期関数式の停止/再開と、プロミスの解決/拒否を待ちます。</dd> - <dt>{{JSxRef("Global_Objects/Array", "[]")}}</dt> - <dd>配列初期化子またはリテラル構文です。</dd> - <dt>{{JSxRef("Operators/Object_initializer", "{}")}}</dt> - <dd>オブジェクト初期化子またはリテラル構文です。</dd> - <dt>{{JSxRef("Global_Objects/RegExp", "/ab+c/i")}}</dt> - <dd>正規表現式のリテラル構文です。</dd> - <dt>{{JSxRef("Operators/Grouping", "( )")}}</dt> - <dd>グループ化演算子です。</dd> -</dl> - -<h3 id="Left-hand-side_expressions">左辺式</h3> - -<p>左辺値は、代入の対象になります。</p> - -<dl> - <dt>{{JSxRef("Operators/Property_accessors", "プロパティアクセサー", "", 1)}}</dt> - <dd>プロパティアクセス演算子はオブジェクトのプロパティやメソッドへのアクセスを提供します<br> - (<code>object.property</code> や <code>object["property"]</code>)。</dd> - <dt>{{JSxRef("Operators/new", "new")}}</dt> - <dd><code>new</code> 演算子はコンストラクターのインスタンスを作成します。</dd> - <dt>{{JSxRef("Operators/new%2Etarget", "new.target")}}</dt> - <dd>コンストラクター内で <code>new.target</code> を使うことで、{{jsxref("Operators/new", "new")}} によって呼び出されるコンストラクターを参照できます。</dd> - <dt>{{JSxRef("Statements/import%2Emeta", "import.meta")}}</dt> - <dd>コンテキストに依存したメタデータを JavaScript モジュールへ公開するオブジェクトです。</dd> - <dt>{{JSxRef("Operators/super", "super")}}</dt> - <dd><code>super</code> キーワードは親コンストラクターを呼び出します。</dd> - <dt>{{JSxRef("Operators/Spread_syntax", "...obj")}}</dt> - <dd>展開記法 (スプレッド記法) は、式を複数の引数または複数の要素に展開して、それぞれ関数呼び出しまたは配列リテラルに渡します。</dd> -</dl> - -<h3 id="Increment_and_decrement">インクリメントとデクリメント</h3> - -<p>接尾/接頭辞のインクリメント演算子と接尾/接頭辞のデクリメント演算子です。</p> - -<dl> - <dt>{{JSxRef("Operators/Increment", "A++")}}</dt> - <dd>後置型インクリメント演算子。</dd> - <dt>{{JSxRef("Operators/Decrement", "A--")}}</dt> - <dd>後置型デクリメント演算子。</dd> - <dt>{{JSxRef("Operators/Increment", "++A")}}</dt> - <dd>前置型インクリメント演算子。</dd> - <dt>{{JSxRef("Operators/Decrement", "--A")}}</dt> - <dd>前置型デクリメント演算子。</dd> -</dl> - -<h3 id="Unary_operators">単項演算子</h3> - -<p>単項演算は、1 個のオペランドによる演算です。</p> - -<dl> - <dt>{{JSxRef("Operators/delete", "delete")}}</dt> - <dd><code>delete</code> 演算子は、オブジェクトからプロパティを削除します。</dd> - <dt>{{JSxRef("Operators/void", "void")}}</dt> - <dd><code>void</code> 演算子は、式の戻り値を破棄します。</dd> - <dt>{{JSxRef("Operators/typeof", "typeof")}}</dt> - <dd><code>typeof</code> 演算子は、与えられたオブジェクトの型を判別します。</dd> - <dt>{{JSxRef("Operators/Unary_plus", "+")}}</dt> - <dd>単項正値演算子は、そのオペランドを Number 型に変換します。</dd> - <dt>{{JSxRef("Operators/Unary_negation", "-")}}</dt> - <dd>単項負値演算子は、そのオペランドを Number 型に変換して正負を反転します。</dd> - <dt>{{JSxRef("Operators/Bitwise_NOT", "~")}}</dt> - <dd>ビット否定演算子です。</dd> - <dt>{{JSxRef("Operators/Logical_NOT", "!")}}</dt> - <dd>論理否定演算子です。</dd> -</dl> - -<h3 id="Arithmetic_operators">算術演算子</h3> - -<p>算術演算子は、数値 (リテラルまたは値) をオペランドとして取り、1 個の数値を返します。</p> - -<dl> - <dt>{{JSxRef("Operators/Addition", "+")}}</dt> - <dd>加算演算子です。</dd> - <dt>{{JSxRef("Operators/Subtraction", "-")}}</dt> - <dd>減算演算子です。</dd> - <dt>{{JSxRef("Operators/Division", "/")}}</dt> - <dd>除算演算子です。</dd> - <dt>{{JSxRef("Operators/Multiplication", "*")}}</dt> - <dd>乗算演算子です。</dd> - <dt>{{JSxRef("Operators/Remainder", "%")}}</dt> - <dd>剰余演算子です。</dd> - <dt>{{JSxRef("Operators/Exponentiation", "**")}}</dt> - <dd>べき乗演算子です。</dd> -</dl> - -<h3 id="Relational_operators">関係演算子</h3> - -<p>比較演算子は、そのオペランドを比較し、その比較が真かどうかに基づいて <code>Boolean</code> 値を返します。</p> - -<dl> - <dt>{{JSxRef("Operators/in", "in")}}</dt> - <dd><code>in</code> 演算子は、与えられたプロパティをオブジェクトが持っているかどうかを判別します。</dd> - <dt>{{JSxRef("Operators/instanceof", "instanceof")}}</dt> - <dd><code>instanceof</code> 演算子は、オブジェクトが別のオブジェクトのインスタンスかどうかを判別します。</dd> - <dt>{{JSxRef("Operators/Less_than", "<")}}</dt> - <dd>小なり演算子です。</dd> - <dt>{{JSxRef("Operators/Greater_than", ">")}}</dt> - <dd>大なり演算子です。</dd> - <dt>{{JSxRef("Operators/Less_than_or_equal", "<=")}}</dt> - <dd>小なりイコール演算子です。</dd> - <dt>{{JSxRef("Operators/Greater_than_or_equal", ">=")}}</dt> - <dd>大なりイコール演算子です。</dd> -</dl> - -<div class="notecard note"> -<p><strong>注: =></strong> は演算子ではなく、<a href="/ja/docs/Web/JavaScript/Reference/Functions/Arrow_functions">アロー関数</a> のための記法です。</p> -</div> - -<h3 id="Equality_operators">等値演算子</h3> - -<p>等値演算子の評価結果は常に、比較が真かどうかに基づいて <code>Boolean</code> 型の値になります。</p> - -<dl> - <dt>{{JSxRef("Operators/Equality", "==")}}</dt> - <dd>等値演算子です。</dd> - <dt>{{JSxRef("Operators/Inequality", "!=")}}</dt> - <dd>不等値演算子です。</dd> - <dt>{{JSxRef("Operators/Strict_equality", "===")}}</dt> - <dd>同値演算子です。</dd> - <dt>{{JSxRef("Operators/Strict_inequality", "!==")}}</dt> - <dd>非同値演算子です。</dd> -</dl> - -<h3 id="Bitwise_shift_operators">ビットシフト演算子</h3> - -<p>オペランドのすべてのビットをシフト演算します。</p> - -<dl> - <dt>{{JSxRef("Operators/Left_shift", "<<")}}</dt> - <dd>ビット左シフト演算子です。</dd> - <dt>{{JSxRef("Operators/Right_shift", ">>")}}</dt> - <dd>ビット右シフト演算子です。</dd> - <dt>{{JSxRef("Operators/Unsigned_right_shift", ">>>")}}</dt> - <dd>ビット符号なし右シフト演算子です。</dd> -</dl> - -<h3 id="Binary_bitwise_operators">バイナリービット演算子</h3> - -<p>ビット演算子は、そのオペランドを 32 ビット (0 と 1) の並びとして扱い、標準の JavaScript 数値を返します。</p> - -<dl> - <dt>{{JSxRef("Operators/Bitwise_AND", "&")}}</dt> - <dd>ビット論理積 (AND) です。</dd> - <dt>{{JSxRef("Operators/Bitwise_OR", "|")}}</dt> - <dd>ビット論理和 (OR) です。</dd> - <dt>{{JSxRef("Operators/Bitwise_XOR", "^")}}</dt> - <dd>ビット排他的論理和 (XOR) です。</dd> -</dl> - -<h3 id="Binary_logical_operators">バイナリー論理演算子</h3> - -<p>論理演算には、一般的に (論理) 真偽値が使用され、それが置かれた時に真偽値を返します。</p> - -<dl> - <dt>{{JSxRef("Operators/Logical_AND", "&&")}}</dt> - <dd>論理積 (AND) です。</dd> - <dt>{{JSxRef("Operators/Logical_OR", "||")}}</dt> - <dd>論理和 (OR) です。</dd> - <dt>{{JSxRef("Operators/Nullish_coalescing_operator", "??")}}</dt> - <dd>Null 合体演算子です。</dd> -</dl> - -<h3 id="Conditional_ternary_operator">条件 (三項) 演算子</h3> - -<dl> - <dt>{{JSxRef("Operators/Conditional_Operator", "(condition ? ifTrue : ifFalse)")}}</dt> - <dd> - <p>この条件演算子は、条件の論理値を基に、2 つの値のいずれか一方を返します。</p> - </dd> -</dl> - -<h3 id="Optional_Chaining_operator">オプショナルチェイニング演算子</h3> - -<dl> - <dt>{{JSxRef("Operators/Optional_chaining", "?.")}}</dt> - <dd> - <p>オプショナルチェイニング演算子は、参照が <a href="/ja/docs/Glossary/Nullish">nullish</a>(<a href="/ja/docs/Web/JavaScript/Reference/Global_Objects/null"><code>null</code></a> または <a href="/ja/docs/Web/JavaScript/Reference/Global_Objects/undefined"><code>undefined</code></a>)の場合にエラーを発生させるのではなく、<code>undefined</code> を返します。</p> - </dd> -</dl> - -<h3 id="Assignment_operators">代入演算子</h3> - -<p>代入演算子は、右辺のオペランドに基づいて、値を左辺のオペランドに代入します。</p> - -<dl> - <dt>{{JSxRef("Operators/Assignment", "=")}}</dt> - <dd>代入演算子です。</dd> - <dt>{{JSxRef("Operators/Multiplication_assignment", "*=")}}</dt> - <dd>乗算値を代入します。</dd> - <dt>{{JSxRef("Operators/Exponentiation_assignment", "**=")}}</dt> - <dd>べき乗値を代入します。</dd> - <dt>{{JSxRef("Operators/Division_assignment", "/=")}}</dt> - <dd>除算値を代入します。</dd> - <dt>{{JSxRef("Operators/Remainder_assignment", "%=")}}</dt> - <dd>剰余値を代入します。</dd> - <dt>{{JSxRef("Operators/Addition_assignment", "+=")}}</dt> - <dd>加算値を代入します。</dd> - <dt>{{JSxRef("Operators/Subtraction_assignment", "-=")}}</dt> - <dd>減算値を代入します。</dd> - <dt>{{JSxRef("Operators/Left_shift_assignment", "<<=")}}</dt> - <dd>左シフトした値を代入します。</dd> - <dt>{{JSxRef("Operators/Right_shift_assignment", ">>=")}}</dt> - <dd>右シフトした値を代入します。</dd> - <dt>{{JSxRef("Operators/Unsigned_right_shift_assignment", ">>>=")}}</dt> - <dd>符号なしの右シフトした値を代入します。</dd> - <dt>{{JSxRef("Operators/Bitwise_AND_assignment", "&=")}}</dt> - <dd>ビット論理積 (AND) の値を代入します。</dd> - <dt>{{JSxRef("Operators/Bitwise_XOR_assignment", "^=")}}</dt> - <dd>ビット排他的論理和 (XOR) の値を代入します。</dd> - <dt>{{JSxRef("Operators/Bitwise_OR_assignment", "|=")}}</dt> - <dd>ビット論理和 (OR) の値を代入します。</dd> - <dt>{{JSxRef("Operators/Logical_AND_assignment", "&&=")}}</dt> - <dd>論理積代入です。</dd> - <dt>{{JSxRef("Operators/Logical_OR_assignment", "||=")}}</dt> - <dd>論理和代入です。</dd> - <dt>{{JSxRef("Operators/Logical_nullish_assignment", "??=")}}</dt> - <dd>論理 Null 代入です。</dd> - <dt>{{JSxRef("Operators/Destructuring_assignment", "[a, b] = [1, 2]")}}<br> - {{JSxRef("Operators/Destructuring_assignment", "{a, b} = {a:1, b:2}")}}</dt> - <dd> - <p>分割代入は、配列やオブジェクトのプロパティを、配列やオブジェクトリテラルに似た構文を使用して変数に代入します。</p> - </dd> -</dl> - -<h3 id="Comma_operator">カンマ演算子</h3> - -<dl> - <dt>{{JSxRef("Operators/Comma_Operator", ",")}}</dt> - <dd>カンマ演算子は、複数の式を単一の文で評価し、その最後の式の結果を返します。</dd> -</dl> - -<h2 id="Specifications">仕様書</h2> - -<table class="standard-table"> - <thead> - <tr> - <th scope="col">仕様書</th> - </tr> - </thead> - <tbody> - <tr> - <td>{{SpecName('ESDraft', '#sec-ecmascript-language-expressions', 'ECMAScript Language: Expressions')}}</td> - </tr> - </tbody> -</table> - -<h2 id="Browser_compatibility">ブラウザーの互換性</h2> - -<p>{{Compat("javascript.operators")}}</p> - -<h2 id="See_also">関連情報</h2> - -<ul> - <li><a href="/ja/docs/Web/JavaScript/Reference/Operators/Operator_Precedence">演算子の優先順位</a></li> -</ul> |