CodeNewbie Community 🌱

paint beast
paint beast

Posted on

What are the JavaScript objects built in methods?

javaScript has several built-in methods for objects. Some of the most commonly used ones include:

Object.assign() - used to copy the values of all enumerable properties from one or more source objects to a target object.
Object.keys() - returns an array of a given object's own enumerable property names.
Object.values() - returns an array of a given object's own enumerable property values.
Object.entries() - returns an array of a given object's own enumerable property [key, value] pairs.
Object.hasOwnProperty() - returns a boolean indicating whether the object has the specified property as its own property (as opposed to inheriting it).
Object.freeze() - freezes an object, preventing new properties from being added to it, existing properties from being removed, or values from being changed to Paints Beast Object.seal() - seals an object, preventing new properties from being added to it, but still allowing existing properties to be changed.
Object.create() - creates a new object with the specified prototype object and properties.
These are just a few examples of the built-in methods available in JavaScript for working with objects. There are many more, each with their own specific uses and functionality.

Top comments (0)