Javatpoint Logo
Javatpoint Logo

jQuery isPlainObject() method

The isPlainObject() method returns a Boolean value and determines whether the passed argument is a plain object or not. If it finds the passed value is a plain object, it returns true. Otherwise, it returns false. The plain object is created using "{}" or by using "new Object". So, the isPlainObject() method returns true for the objects created using the "{}" or by using the "new Object()".

Syntax

The commonly used syntax of this method is given below -

This method accepts a single parameter, which is defined as follows -

obj - It is the object to be checked to see whether it is a plain object or not.

Let's understand the working of the isPlainObject() method, using an illustration.

Example

In this example, we are using the isPlainObject() method to determine whether the passed values are plain object or not. Here, we are passing different values such as {}, Object, etc. as an argument.

Test it Now

Output

After the execution of the above code, the output will be -

jQuery isPlainObject() method





Youtube For Videos Join Our Youtube Channel: Join Now

Feedback


Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Preparation


Trending Technologies


B.Tech / MCA