close
The Wayback Machine - https://web.archive.org/web/20240118171342/https://www.geeksforgeeks.org/lodash-math-complete-reference/
Open In App
Related Articles

Lodash Math Complete Reference

Improve
Improve
Improve
Like Article
Like
Save Article
Save
Report issue
Report

Lodash is a JavaScript library that works on the top of underscore.js. Lodash helps in working with arrays, strings, objects, numbers, etc. It provides us with various inbuilt functions and uses a functional programming approach which makes coding in javascript easier to understand because instead of writing repetitive functions, tasks can be accomplished with a single line of code.

Methods

Description

_.add() It is used to add two numbers.
_.ceil() It is used to compute number rounded up to precision.
_.divide() It is used to divide two numbers.
_.floor() It is used to compute numbers rounded down to precision means it rounded down to the floor value.
_.max() It is used to find the maximum element from the array.
_.maxBy() It is used to compute the maximum value from the original array by iterating over each element.
_.mean() It is used to find the mean of the values in the array.
_.meanBy() It is used to compute the mean value from the original array by iterating over each element.
_.min() It is used to find the minimum element from the array.
_.minBy() It is used to compute the minimum value from the original array by iterating over each element.
_.multiply() It is used to multiply the two given numbers in the parameters.
_.round() It is used to compute number rounded to precision.
_.subtract() It is used to subtract two numbers.
_.sum() It is used to find the sum of the values in the array.
_.sumBy() It is used to compute the sum from the original array by iterating over each element.
Learn to code easily with our course Coding for Everyone. This course is accessible and designed for everyone, even if you're new to coding. Start today and join millions on a journey to improve your skills!

Whether you're preparing for your first job interview or aiming to upskill in this ever-evolving tech landscape, GeeksforGeeks 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!

Commit to GfG's Three-90 Challenge! Purchase a course, complete 90% in 90 days, and save 90% cost click here to explore.
Last Updated : 26 Jul, 2023
Like Article
Save Article
Previous
Next
Share your thoughts in the comments
Similar Reads
Complete Tutorials