Wednesday, June 10, 2026
HomeLanguagesJavascriptLodash _.isDecreasing() Method

Lodash _.isDecreasing() Method

The _.isDecreasing() Method checks whether the arguments are monotonically decreasing values or not or whether each argument is less than the previous argument.

Syntax:

_.isDecreasing(val1,val2,...,valn);

Parameters: This method n values to check for decreasing order.

Return Value: This method returns a Boolean value(Returns true if the given values are decreasing, else false).

Note: To execute the below examples, you have to install the lodash-contrib library by using this command prompt and execute the following command.

npm install lodash-contrib

Below examples illustrate the Lodash _.isDecreasing() method in JavaScript:

Example 1:

Javascript




// Defining lodash contrib variable 
var _ = require('lodash-contrib'); 
  
// Checking 
console.log("The Value is Decreasing : " 
            +_.isDecreasing(5,4,3,2,1));


Output:

The Value is Decreasing : true


Example 2: 

Javascript




// Defining lodash contrib variable 
var _ = require('lodash-contrib'); 
  
// Checking 
console.log("The Value is Decreasing : " 
             +_.isDecreasing(3,2,1,2));


Output:

The Value is Decreasing : false
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

2 COMMENTS

Most Popular

Dominic
32515 POSTS0 COMMENTS
Milvus
131 POSTS0 COMMENTS
Nango Kala
6896 POSTS0 COMMENTS
Nicole Veronica
12012 POSTS0 COMMENTS
Nokonwaba Nkukhwana
12109 POSTS0 COMMENTS
Shaida Kate Naidoo
7018 POSTS0 COMMENTS
Ted Musemwa
7262 POSTS0 COMMENTS
Thapelo Manthata
6976 POSTS0 COMMENTS
Umr Jansen
6963 POSTS0 COMMENTS