• Skip to main content
  • Skip to search
  • Skip to select language
MDN Web Docs
  • References
    • Overview / Web Technology

      Web technology reference for developers

    • HTML

      Structure of content on the web

    • CSS

      Code used to describe document style

    • JavaScript

      General-purpose scripting language

    • HTTP

      Protocol for transmitting web resources

    • Web APIs

      Interfaces for building web applications

    • Web Extensions

      Developing extensions for web browsers

    • Accessibility

      Build web projects usable for all

    • Web Technology

      Web technology reference for developers

  • Learn
    • Overview / MDN Learning Area

      Learn web development

    • MDN Learning Area

      Learn web development

    • HTML

      Learn to structure web content with HTML

    • CSS

      Learn to style content using CSS

    • JavaScript

      Learn to run scripts in the browser

    • Accessibility

      Learn to make the web accessible to all

  • Plus
    • Overview

      A customized MDN experience

    • AI Help

      Get real-time assistance and support

    • Updates

      All browser compatibility updates at a glance

    • Documentation

      Learn how to use MDN Plus

    • FAQ

      Frequently asked questions about MDN Plus

  • Curriculum New
  • Blog
    • Playground

      Write, test and share your code

    • HTTP Observatory

      Scan a website for free

    • AI Help

      Get real-time assistance and support

  • Log in
  • Sign up for free
  1. 開発者向けのウェブ技術
  2. JavaScript
  3. JavaScript リファレンス
  4. 式と演算子
  5. オブジェクト初期化子
    • English (US)
    • Deutsch
    • Français
    • 한국어
    • Português (do Brasil)
    • Русский
    • 中文 (简体)

このページはコミュニティーの尽力で英語から翻訳されました。MDN Web Docs コミュニティーについてもっと知り、仲間になるにはこちらから。

この記事では

  • 試してみましょう
  • 構文
  • 解説
  • 例
  • 仕様書
  • ブラウザーの互換性
  • 関連情報
  1. JavaScript
  2. チュートリアル
  3. Beginner's tutorials
    1. Your first website: Adding interactivity
    2. Dynamic scripting with JavaScript
    3. JavaScript frameworks and libraries
  4. JavaScript ガイド
    1. 入門編
    2. 文法とデータ型
    3. 制御フローとエラー処理
    4. ループとイテレーター
    5. 関数
    6. 式と演算子
    7. Numbers and strings
    8. Representing dates & times
    9. 正規表現
    10. インデックス付きコレクション
    11. キー付きコレクション
    12. オブジェクトを利用する
    13. クラスの使用
    14. プロミスの使用
    15. JavaScript 型付き配列
    16. イテレーターとジェネレーター
    17. Internationalization
    18. メタプログラミング
    19. JavaScript モジュール
  5. 中級編
    1. Advanced JavaScript objects
    2. Asynchronous JavaScript
    3. Client-side web APIs
    4. 言語概要
    5. JavaScript のデータ構造
    6. 等値比較と同一性
    7. プロパティの列挙可能性と所有権
    8. クロージャ
  6. 上級編
    1. 継承とプロトタイプチェーン
    2. メモリー管理
  7. リファレンス
  8. 組み込みオブジェクト
    1. AggregateError
    2. Array
    3. ArrayBuffer
    4. AsyncFunction
    5. AsyncGenerator
    6. AsyncGeneratorFunction
    7. AsyncIterator
    8. Atomics
    9. BigInt
    10. BigInt64Array
    11. BigUint64Array
    12. Boolean
    13. DataView
    14. Date
    15. decodeURI()
    16. decodeURIComponent()
    17. encodeURI()
    18. encodeURIComponent()
    19. Error
    20. escape() 非推奨;
    21. eval()
    22. EvalError
    23. FinalizationRegistry
    24. Float16Array
    25. Float32Array
    26. Float64Array
    27. Function
    28. Generator
    29. GeneratorFunction
    30. globalThis
    31. Infinity
    32. Int16Array
    33. Int32Array
    34. Int8Array
    35. InternalError 非標準
    36. Intl
    37. isFinite()
    38. isNaN()
    39. Iterator
    40. JSON
    41. Map
    42. Math
    43. NaN
    44. Number
    45. Object
    46. parseFloat()
    47. parseInt()
    48. Promise
    49. Proxy
    50. RangeError
    51. ReferenceError
    52. Reflect
    53. RegExp
    54. Set
    55. SharedArrayBuffer
    56. String
    57. Symbol
    58. SyntaxError
    59. Temporal Experimental
    60. TypedArray
    61. TypeError
    62. Uint16Array
    63. Uint32Array
    64. Uint8Array
    65. Uint8ClampedArray
    66. undefined
    67. unescape() 非推奨;
    68. URIError
    69. WeakMap
    70. WeakRef
    71. WeakSet
  9. 式と演算子
    1. 加算 (+)
    2. 加算代入 (+=)
    3. 代入 (=)
    4. async function 式
    5. async function* 式
    6. await
    7. ビット論理積 (&)
    8. ビット論理積代入 (&=)
    9. ビット否定 (~)
    10. ビット論理和 (|)
    11. ビット論理和代入 (|=)
    12. ビット排他的論理和 (^)
    13. ビット排他的論理和代入 (^=)
    14. クラス式
    15. カンマ演算子 (,)
    16. 条件 (三項) 演算子
    17. デクリメント (--)
    18. delete 演算子
    19. 分割代入
    20. 除算 (/)
    21. 除算代入 (/=)
    22. 等価 (==)
    23. べき乗 (**)
    24. べき乗代入 (**=)
    25. 関数式
    26. function* 式
    27. 大なり (>)
    28. 大なりイコール (>=)
    29. グループ化演算子 ( )
    30. import.meta
      1. import.meta.resolve()
    31. import()
    32. in 演算子
    33. インクリメント (++)
    34. 不等価 (!=)
    35. instanceof
    36. 左シフト (<<)
    37. 左シフト代入 (<<=)
    38. 小なり (<)
    39. 小なりイコール (<=)
    40. 論理積 (&&)
    41. 論理積代入 (&&=)
    42. 論理否定 (!)
    43. 論理和 (||)
    44. 論理和代入 (||=)
    45. 乗算 (*)
    46. 乗算代入 (*=)
    47. new 演算子
    48. new.target
    49. null
    50. Null 合体代入 (??=)
    51. Null 合体演算子 (??)
    52. オブジェクト初期化子
    53. 演算子の優先順位
    54. オプショナルチェーン (?.)
    55. プロパティアクセサー
    56. 剰余 (%)
    57. 剰余代入 (%=)
    58. 右シフト (>>)
    59. 右シフト代入 (>>=)
    60. スプレッド構文
    61. 厳密等価 (===)
    62. 厳密不等価 (!==)
    63. 減算 (-)
    64. 減算代入 (-=)
    65. super
    66. this
    67. typeof
    68. 単項マイナス (-)
    69. 単項プラス (+)
    70. 符号なし右シフト (>>>)
    71. 符号なし右シフト代入 (>>>=)
    72. void 演算子
    73. yield
    74. yield*
  10. 文と宣言
    1. async function
    2. async function*
    3. ブロック
    4. break
    5. class
    6. const
    7. continue
    8. debugger
    9. do...while
    10. 空文
    11. export
    12. 式文
    13. for
    14. for await...of
    15. for...in
    16. for...of
    17. function 宣言
    18. function* 宣言
    19. if...else
    20. import
      1. インポート属性
    21. ラベル
    22. let
    23. return
    24. switch
    25. throw
    26. try...catch
    27. var
    28. while
    29. with 非推奨;
  11. 関数
    1. アロー関数式
    2. デフォルト引数
    3. ゲッター
    4. メソッド定義
    5. 残余引数
    6. セッター
    7. arguments オブジェクト
      1. arguments.callee 非推奨;
      2. arguments.length
      3. arguments[Symbol.iterator]()
  12. クラス
    1. constructor
    2. extends
    3. プライベートプロパティ
    4. パブリッククラスフィールド
    5. static
    6. 静的初期化ブロック
  13. 正規表現
    1. 後方参照: \1, \2
    2. キャプチャグループ: (...)
    3. 文字クラスエスケープ: \d, \D, \w, \W, \s, \S
    4. 文字クラス: [...], [^...]
    5. 文字エスケープ: \n, \u{...}
    6. 論理和: |
    7. 入力境界アサーション: ^, $
    8. リテラル文字: a, b
    9. 先読みアサーション: (?=...), (?!...)
    10. 後読みアサーション: (?<=...), (?<!...)
    11. Modifier: (?ims-ims:...)
    12. 名前付き後方参照: \k<name>
    13. 名前付きキャプチャグループ: (?<name>...)
    14. 非キャプチャグループ: (?:...)
    15. 数量詞: *, +, ?, {n}, {n,}, {n,m}
    16. Unicode 文字クラスエスケープ: \p{...}, \P{...}
    17. ワイルドカード: .
    18. 単語境界アサーション: \b, \B
  14. エラー
    1. AggregateError: No Promise in Promise.any was resolved
    2. Error: Permission denied to access property "x"
    3. InternalError: too much recursion
    4. RangeError: argument is not a valid code point
    5. RangeError: BigInt division by zero
    6. RangeError: BigInt negative exponent
    7. RangeError: form must be one of 'NFC', 'NFD', 'NFKC', or 'NFKD'
    8. RangeError: invalid array length
    9. RangeError: invalid date
    10. RangeError: precision is out of range
    11. RangeError: radix must be an integer
    12. RangeError: repeat count must be less than infinity
    13. RangeError: repeat count must be non-negative
    14. RangeError: x can't be converted to BigInt because it isn't an integer
    15. ReferenceError: "x" is not defined
    16. ReferenceError: assignment to undeclared variable "x"
    17. ReferenceError: can't access lexical declaration`X' before initialization
    18. ReferenceError: must call super constructor before using 'this' in derived class constructor
    19. ReferenceError: super() called twice in derived class constructor
    20. SyntaxError: 'arguments'/'eval' can't be defined or assigned to in strict mode code
    21. SyntaxError: "0"-prefixed octal literals and octal escape seq. are deprecated
    22. SyntaxError: "use strict" not allowed in function with non-simple parameters
    23. SyntaxError: "x" is a reserved identifier
    24. SyntaxError: \ at end of pattern
    25. SyntaxError: a declaration in the head of a for-of loop can't have an initializer
    26. SyntaxError: applying the 'delete' operator to an unqualified name is deprecated
    27. SyntaxError: arguments is not valid in fields
    28. SyntaxError: await is only valid in async functions, async generators and modules
    29. SyntaxError: await/yield expression can't be used in parameter
    30. SyntaxError: cannot use `??` unparenthesized within `||` and `&&` expressions
    31. SyntaxError: character class escape cannot be used in class range in regular expression
    32. SyntaxError: continue must be inside loop
    33. SyntaxError: duplicate capture group name in regular expression
    34. SyntaxError: duplicate formal argument x
    35. SyntaxError: for-in loop head declarations may not have initializers
    36. SyntaxError: function statement requires a name
    37. SyntaxError: functions cannot be labelled
    38. SyntaxError: getter and setter for private name #x should either be both static or non-static
    39. SyntaxError: getter functions must have no arguments
    40. SyntaxError: identifier starts immediately after numeric literal
    41. SyntaxError: illegal character
    42. SyntaxError: import declarations may only appear at top level of a module
    43. SyntaxError: incomplete quantifier in regular expression
    44. ReferenceError: invalid assignment left-hand side
    45. SyntaxError: invalid BigInt syntax
    46. SyntaxError: invalid capture group name in regular expression
    47. SyntaxError: invalid character in class in regular expression
    48. SyntaxError: invalid class set operation in regular expression
    49. SyntaxError: invalid decimal escape in regular expression
    50. SyntaxError: invalid identity escape in regular expression
    51. SyntaxError: invalid named capture reference in regular expression
    52. SyntaxError: invalid property name in regular expression
    53. SyntaxError: invalid range in character class
    54. SyntaxError: invalid regexp group
    55. SyntaxError: invalid regular expression flag "x"
    56. SyntaxError: invalid unicode escape in regular expression
    57. SyntaxError: JSON.parse: bad parsing
    58. SyntaxError: label not found
    59. SyntaxError: missing : after property id
    60. SyntaxError: missing ) after argument list
    61. SyntaxError: missing ) after condition
    62. SyntaxError: missing ] after element list
    63. SyntaxError: missing } after function body