Jobs
Blogs
Courses
Mentorship
Partners
For Employers
e2e logo

JavaScript Objects

mac

OBJECT METHODS

                     In JavaScript, an object is an unordered collection of key-value pairs. Each key-value pair is called a property. The key of a property can be a string. And the value of a property can be any value, e.g., a string, a number, an array, and even a function.

Now lets start to learn the Object methods...


1.Object.assign( )

                   The Object.assign() method is used to copy the values of all enumerable own properties from one or more source objects to a target object. Objects are assigned and copied by reference. It will return the target object.

2.Object.entries( )

                    JavaScript Object.entries() method is used to return an array of a given object's own enumerable property [key, value] pairs.

3.Object.freeze( )

               The Object.freeze() method freezes an object that prevents new properties from being added to it. This method prevents the modification of existing property, attributes, and values. 

4.Object.create( )

               The Object.create() method is used to create a new object with the specified prototype object and properties. 


5.Object.is( )

                           This method determines whether two values are same or not. It will return the boolean value.

 Thank you...