Saturday, December 13, 2025
HomeLanguagesJavascriptLodash _.isFunction() Method

Lodash _.isFunction() Method

The Lodash _.isFunction() Method checks whether the given value is a function object or not and returns the corresponding boolean value.

Syntax:

_.isFunction( value )

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

  • value: This parameter holds the value that to be checked for a function object.

Return Value: This method returns a Boolean value(Returns true if the given value is Function object number, else false).

Example 1: 

Javascript




// Defining Lodash variable 
const _ = require('lodash'); 
  
function Geeks(){
    var a="gfg";
}
// Checking for Function
console.log("The Value is Function : "
        + _.isFunction(Geeks));


Output:

The Value is Function : true

Example 2: 

Javascript




// Defining Lodash variable 
const _ = require('lodash'); 
  
// Checking for Function
console.log("The Value is Function : "
        + _.isFunction("Function"));


Output:

The Value is Function : false 

Example 3: For _ object, it returns true.

Javascript




// Defining Lodash variable 
const _ = require('lodash'); 
  
// Checking for Function
console.log("The Value is Function : "
        + _.isFunction(_));


Output:

The Value is Function : true
RELATED ARTICLES

Most Popular

Dominic
32446 POSTS0 COMMENTS
Milvus
105 POSTS0 COMMENTS
Nango Kala
6814 POSTS0 COMMENTS
Nicole Veronica
11952 POSTS0 COMMENTS
Nokonwaba Nkukhwana
12030 POSTS0 COMMENTS
Shaida Kate Naidoo
6949 POSTS0 COMMENTS
Ted Musemwa
7200 POSTS0 COMMENTS
Thapelo Manthata
6897 POSTS0 COMMENTS
Umr Jansen
6882 POSTS0 COMMENTS