Saturday, October 11, 2025
HomeLanguagesJavascriptLodash _.isOdd() Method

Lodash _.isOdd() Method

The Lodash_.isOdd() method checks whether the given value is an odd number or not .

Syntax:

_.isOdd( value )

Parameters: This method accepts a single parameter as mentioned above and described below:

  • value: This parameter holds the value that needs to be checked for odd values.

Return Value: This method returns a Boolean value.

Example 1: 

Javascript




// Defining Lodash variable 
const _ = require('lodash'); 
      
// Checking for an Odd 
console.log("The Value is odd number : " + _.isOdd(3);


Output :

The Value is odd number :  true

Example 2:

Javascript




// Defining Lodash variable 
const _ = require('lodash'); 
      
// Checking for an Odd 
console.log("The Value is odd number : " + _.isOdd(2);


 Output :

The Value is odd number :  false

Example 3:

Javascript




// Defining Lodash variable 
const _ = require('lodash'); 
      
// Checking for an Odd 
console.log("The Value is odd number : " + _.isOdd({});


Output :

The Value is odd number :  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
32350 POSTS0 COMMENTS
Milvus
87 POSTS0 COMMENTS
Nango Kala
6719 POSTS0 COMMENTS
Nicole Veronica
11881 POSTS0 COMMENTS
Nokonwaba Nkukhwana
11941 POSTS0 COMMENTS
Shaida Kate Naidoo
6839 POSTS0 COMMENTS
Ted Musemwa
7101 POSTS0 COMMENTS
Thapelo Manthata
6794 POSTS0 COMMENTS
Umr Jansen
6794 POSTS0 COMMENTS