Saturday, November 15, 2025
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

Most Popular

Dominic
32399 POSTS0 COMMENTS
Milvus
95 POSTS0 COMMENTS
Nango Kala
6765 POSTS0 COMMENTS
Nicole Veronica
11917 POSTS0 COMMENTS
Nokonwaba Nkukhwana
11984 POSTS0 COMMENTS
Shaida Kate Naidoo
6890 POSTS0 COMMENTS
Ted Musemwa
7143 POSTS0 COMMENTS
Thapelo Manthata
6838 POSTS0 COMMENTS
Umr Jansen
6840 POSTS0 COMMENTS