Friday, November 21, 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
32405 POSTS0 COMMENTS
Milvus
97 POSTS0 COMMENTS
Nango Kala
6781 POSTS0 COMMENTS
Nicole Veronica
11928 POSTS0 COMMENTS
Nokonwaba Nkukhwana
11997 POSTS0 COMMENTS
Shaida Kate Naidoo
6907 POSTS0 COMMENTS
Ted Musemwa
7166 POSTS0 COMMENTS
Thapelo Manthata
6862 POSTS0 COMMENTS
Umr Jansen
6847 POSTS0 COMMENTS