A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://www.geeksforgeeks.org/javascript/lodash-_-isarraylikeobject-method/ below:

Lodash _.isArrayLikeObject() Method - GeeksforGeeks

Lodash _.isArrayLikeObject() Method

Last Updated : 15 Jul, 2025

Lodash _.isArrayLikeObject() method checks whether the given value is an Array-like Object or not. This method is similar to the _.isArrayLike() method except that it also checks if the value is an object or not.

Syntax:
_.isArrayLikeObject( value );
Parameters: Return Value:

Example 1: In this example, this method returns true for an Array as it is an object also.

JavaScript
// Defining Lodash variable
const _ = require('lodash');

let val = [1, 2, 3];

// Checking for an ArrayLikeObject
console.log("The Value is ArrayLikeObject : "
    + _.isArrayLikeObject(val)); 

Output:

The Value is ArrayLikeObject : true

Example 2: In this example, this method returns false for the string as it is not an object.

JavaScript
// Defining Lodash variable
const _ = require('lodash');

let val = "GeeksforGeeks";

// Checking for an ArrayLikeObject
console.log("The Value is ArrayLikeObject : "
    + _.isArrayLikeObject(val)); 

Output:

The Value is ArrayLikeObject : false

Example 3: In this example, this method is returning false as given value is not an array-like object.

JavaScript
// Defining Lodash variable
const _ = require('lodash');

let val = { 1: 1 };

// Checking for an ArrayLikeObject
console.log("The Value is ArrayLikeObject : "
    + _.isArrayLikeObject(val)); 

Output:

The Value is ArrayLikeObject : false

Note: This will not work in normal JavaScript because it requires the lodash library to be installed and can be installed using npm install lodash.



RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4