Last Updated : 02 Sep, 2024
Lodash _.divide() method is used to divide two numbers.
Syntax:_.divide(dividend, divisor);Parameters:
This method returns the quotient after dividing two numbers.
Example 1: In this example, we are passing two numbers in the lodash _.divide() method and print the result which is a quotient in the console.
JavaScript
// Requiring the lodash library
const _ = require("lodash");
// Use of _.divide() method
let gfg = _.divide(1508, 4);
// Printing the output
console.log(gfg)
Output:
377
Example 2: In this example, we are passing two numbers in the lodash _.divide() method and print the result which is a quotient in the console.
JavaScript
// Requiring the lodash library
const _ = require("lodash");
// Use of _.divide() method
let gfg = _.divide(12, 5);
// Printing the output
console.log(gfg)
Output:
2.4
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