Thursday, September 4, 2025
HomeLanguagesJavascriptLodash _.multiply() Method

Lodash _.multiply() Method

Lodash is a JavaScript library that works on the top of underscore.js. Lodash helps in working with arrays, strings, objects, numbers, etc.

The _.multiply() method is used to multiply the two given numbers in the parameters and return the result.

Syntax:

_.multiply( multiplier, multiplicand )

Parameters: This method accepts two parameters as mentioned above and described below:

  • 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:

Javascript




// Requiring the lodash library  
const _ = require("lodash");  
    
// Use of _.multiply()  
// method 
let ans = _.multiply(15, 8); 
        
// Printing the output  
console.log(ans);


Output:

120

Example 2:  

Javascript




// Requiring the lodash library  
const _ = require("lodash");  
    
// Use of _.multiply()  
// method 
let ans = _.multiply(23, -9); 
        
// Printing the output  
console.log(ans);


Output:

-207
Whether you’re preparing for your first job interview or aiming to upskill in this ever-evolving tech landscape, neveropen Courses are your key to success. We provide top-quality content at affordable prices, all geared towards accelerating your growth in a time-bound manner. Join the millions we’ve already empowered, and we’re here to do the same for you. Don’t miss out – check it out now!
RELATED ARTICLES

Most Popular

Dominic
32261 POSTS0 COMMENTS
Milvus
81 POSTS0 COMMENTS
Nango Kala
6626 POSTS0 COMMENTS
Nicole Veronica
11795 POSTS0 COMMENTS
Nokonwaba Nkukhwana
11855 POSTS0 COMMENTS
Shaida Kate Naidoo
6747 POSTS0 COMMENTS
Ted Musemwa
7023 POSTS0 COMMENTS
Thapelo Manthata
6695 POSTS0 COMMENTS
Umr Jansen
6714 POSTS0 COMMENTS