A RetroSearch Logo

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

Search Query:

Showing content from https://www.geeksforgeeks.org/javascript/lodash-_-multiply-method/ below:

Lodash _.multiply() Method - GeeksforGeeks

Lodash _.multiply() Method

Last Updated : 02 Sep, 2024

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

Syntax:
_.multiply(multiplier, multiplicand);
Parameters: 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
// 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: In this example, we are getting the product of the given numbers by the use of the lodash _.multiply() method.

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


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