multiply()
multiply(
multiplier,multiplicand):number
Multiplies two numbers.
DEPRECATED
Use the * operator directly instead.
Parametersβ
multiplier: numberβ
The first number in a multiplication.
multiplicand: numberβ
The second number in a multiplication.
Returns: numberβ
The product.
See Alsoβ
Sinceβ
2.0.0
Also known asβ
multiply (Lodash, Ramda) Β· β (es-toolkit, Remeda, Radashi, Effect, Modern Dash, Antfu)
Exampleβ
// β Deprecated approach
multiply(6, 4); // => 24
// β
Recommended approach
6 * 4; // => 24
How it works?β
Multiplies two numbers.
Deprecated: Use the * operator directly.
Native Equivalentβ
// β multiply(6, 4)
// β
6 * 4
Use Casesβ
Multiply numbers πβ
Multiply two numbers.
a * b;
Scale valuesβ
Apply scaling factor.
const scaled = value * scaleFactor;
const withTax = price * 1.2;