A RetroSearch Logo

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

Search Query:

Showing content from http://developer.mozilla.org/ja/docs/Web/JavaScript/Reference/Operators/Subtraction below:

減算 (-) - JavaScript | MDN

Filter sidebar

  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. 数値と文字列
    8. 日付と時刻の表現
    9. 正規表現
    10. インデックス付きコレクション
    11. キー付きコレクション
    12. オブジェクトの利用
    13. クラスの使用
    14. プロミスの使用
    15. JavaScript 型付き配列
    16. イテレーターとジェネレーター
    17. リソース管理
    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. メタプログラミング
    3. メモリー管理
  7. リファレンス
  8. 組み込みオブジェクト
    1. AggregateError
    2. Array
    3. ArrayBuffer
    4. AsyncDisposableStack
    5. AsyncFunction
    6. AsyncGenerator
    7. AsyncGeneratorFunction
    8. AsyncIterator
    9. Atomics
    10. BigInt
    11. BigInt64Array
    12. BigUint64Array
    13. Boolean
    14. DataView
    15. Date
    16. decodeURI()
    17. decodeURIComponent()
    18. DisposableStack
    19. encodeURI()
    20. encodeURIComponent()
    21. Error
    22. escape() 非推奨;
    23. eval()
    24. EvalError
    25. FinalizationRegistry
    26. Float16Array
    27. Float32Array
    28. Float64Array
    29. Function
    30. Generator
    31. GeneratorFunction
    32. globalThis
    33. Infinity
    34. Int8Array
    35. Int16Array
    36. Int32Array
    37. InternalError 非標準
    38. Intl
    39. isFinite()
    40. isNaN()
    41. Iterator
    42. JSON
    43. Map
    44. Math
    45. NaN
    46. Number
    47. Object
    48. parseFloat()
    49. parseInt()
    50. Promise
    51. Proxy
    52. RangeError
    53. ReferenceError
    54. Reflect
    55. RegExp
    56. Set
    57. SharedArrayBuffer
    58. String
    59. SuppressedError
    60. Symbol
    61. SyntaxError
    62. Temporal Experimental
    63. TypedArray
    64. TypeError
    65. Uint8Array
    66. Uint8ClampedArray
    67. Uint16Array
    68. Uint32Array
    69. undefined
    70. unescape() 非推奨;
    71. URIError
    72. WeakMap
    73. WeakRef
    74. 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. await using
    4. ブロック
    5. break
    6. class
    7. const
    8. continue
    9. debugger
    10. do...while
    11. 空文
    12. export
    13. 式文
    14. for
    15. for await...of
    16. for...in
    17. for...of
    18. function 宣言
    19. function* 宣言
    20. if...else
    21. import
      1. インポート属性
    22. ラベル
    23. let
    24. return
    25. switch
    26. throw
    27. try...catch
    28. using
    29. var
    30. while
    31. with 非推奨;
  11. 関数
    1. アロー関数式
    2. デフォルト引数
    3. ゲッター
    4. メソッド定義
    5. 残余引数
    6. セッター
    7. arguments オブジェクト
      1. arguments[Symbol.iterator]()
      2. arguments.callee 非推奨;
      3. arguments.length
  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. 修飾子: (?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
    64. SyntaxError: missing } after property list
    65. SyntaxError: missing = in const declaration
    66. SyntaxError: missing formal parameter
    67. SyntaxError: missing name after . operator
    68. SyntaxError: missing variable name
    69. SyntaxError: negated character class with strings in regular expression
    70. SyntaxError: new keyword cannot be used with an optional chain
    71. SyntaxError: nothing to repeat
    72. SyntaxError: numbers out of order in {} quantifier.
    73. SyntaxError: octal escape sequences can't be used in untagged template literals or in strict mode code
    74. SyntaxError: parameter after rest parameter
    75. SyntaxError: private fields can't be deleted
    76. SyntaxError: property name __proto__ appears more than once in object literal
    77. SyntaxError: raw bracket is not allowed in regular expression with unicode flag
    78. SyntaxError: redeclaration of formal parameter "x"
    79. SyntaxError: reference to undeclared private field or method #x
    80. SyntaxError: rest parameter may not have a default
    81. SyntaxError: return not in function
    82. SyntaxError: setter functions must have one argument
    83. SyntaxError: unterminated string literal
    84. SyntaxError: super() is only valid in derived class constructors
    85. SyntaxError: tagged template cannot be used with optional chain
    86. SyntaxError: Unexpected '#' used outside of class body
    87. SyntaxError: Unexpected token
    88. SyntaxError: unlabeled break must be inside loop or switch
    89. SyntaxError: unparenthesized unary expression can't appear on the left-hand side of '**'
    90. SyntaxError: use of super property/member accesses only valid within methods or eval code within methods
    91. SyntaxError: Using //@ to indicate sourceURL pragmas is deprecated. Use //# instead
    92. ReferenceError: deprecated caller or arguments usage
    93. TypeError: 'x' is not iterable
    94. TypeError: "x" is (not) "y"
    95. TypeError: "x" is not a constructor
    96. TypeError: "x" is not a function
    97. TypeError: "x" is not a non-null object
    98. TypeError: "x" is read-only
    99. TypeError: already executing generator
    100. TypeError: BigInt value can't be serialized in JSON
    101. TypeError: calling a builtin X constructor without new is forbidden
    102. TypeError: can't access/set private field or method: object is not the right class
    103. TypeError: can't assign to property "x" on "y": not an object
    104. TypeError: can't convert BigInt to number
    105. TypeError: can't convert x to BigInt
    106. TypeError: can't define property "x": "obj" is not extensible
    107. TypeError: can't delete non-configurable array element
    108. TypeError: can't redefine non-configurable property "x"
    109. TypeError: can't set prototype of this object
    110. TypeError: can't set prototype: it would cause a prototype chain cycle
    111. TypeError: cannot use 'in' operator to search for 'x' in 'y'
    112. TypeError: class constructors must be invoked with 'new'
    113. TypeError: cyclic object value
    114. TypeError: derived class constructor returned invalid value x
    115. TypeError: getting private setter-only property
    116. TypeError: Initializing an object twice is an error with private fields/methods
    117. TypeError: invalid 'instanceof' operand 'x'
    118. TypeError: invalid Array.prototype.sort argument
    119. TypeError: invalid assignment to const "x"
    120. TypeError: Iterator/AsyncIterator constructor can't be used directly
    121. TypeError: matchAll/replaceAll must be called with a global RegExp
    122. TypeError: More arguments needed
    123. TypeError: "x" has no properties
    124. TypeError: property "x" is non-configurable and can't be deleted
    125. TypeError: Reduce of empty array with no initial value
    126. TypeError: setting getter-only property "x"
    127. TypeError: WeakSet key/WeakMap value 'x' must be an object or an unregistered symbol
    128. TypeError: X.prototype.y called on incompatible type
    129. URIError: malformed URI sequence
    130. Warning: -file- is being assigned a //# sourceMappingURL, but already has one
    131. Warning: unreachable code after return statement
  15. その他
    1. JavaScript 技術概説
    2. 実行モデル
    3. 字句文法
    4. 反復処理プロトコル
    5. 厳格モード
    6. テンプレート文字列
    7. 末尾のカンマ
    8. 非推奨の機能
減算 (-)

Baseline Widely available

減算演算子 (-) は 2 つのオペランドの間で減算し、それらの差を生成します。

試してみましょう
console.log(5 - 3);
// Expected output: 2

console.log(3.5 - 5);
// Expected output: -1.5

console.log(5 - "hello");
// Expected output: NaN

console.log(5 - true);
// Expected output: 4
構文 例 数値の減算

js

5 - 3; // 2
3 - 5; // -2
非数の減算 仕様書 ブラウザーの互換性 関連情報

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