Оператор множення (*
) повертає добуток операндів.
The source for this interactive example is stored in a GitHub repository. If you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
Синтаксис
Оператор: x * y
Приклади
Множення чисел
2 * 2 // 4
-2 * 2 // -4
Множення на нескінченність
Infinity * 0 // NaN
Infinity * Infinity // Infinity
Множення нечислових значень
'foo' * 2 // NaN
Специфікації
Специфікація |
---|
ECMAScript (ECMA-262) The definition of 'Multiplication operator' in that specification. |
Сумісність з веб-переглядачами
BCD tables only load in the browser