jQuery isPlainObject() methodThe 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()". SyntaxThe 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. ExampleIn 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 NowOutput After the execution of the above code, the output will be - Next TopicjQuery isFunction() method |
We provides tutorials and interview questions of all technology like java tutorial, android, java frameworks
G-13, 2nd Floor, Sec-3, Noida, UP, 201301, India