Lodash _.multiply() Method
Last Updated :
03 Nov, 2023
Lodash _.multiply() method is used to multiply the two given numbers in the parameters and return the result.
Syntax:
_.multiply(multiplier, multiplicand);
Parameters:
- multiplier: This parameter holds the first number in the multiplication.
- multiplicand: This parameter holds the second number in the multiplication.
Return Value:
This method returns the product of two numbers.
Example 1: In this example, we are getting the product of the given numbers by the use of the lodash _.multiply() method.
Javascript
const _ = require( "lodash" );
let ans = _.multiply(15, 8);
console.log(ans);
|
Output:
120
Example 2: In this example, we are getting the product of the given numbers by the use of the lodash _.multiply() method.
Javascript
const _ = require( "lodash" );
let ans = _.multiply(23, -9);
console.log(ans);
|
Output:
-207
Like Article
Suggest improvement
Share your thoughts in the comments
Please Login to comment...