Object Methods
Object Methods
Methods
[email protected]
soumyabalamaala soumyabalamaala
1. Object.keys()
Definition:
Returns an array of a given object’s property
names.
soumyabalamaala soumyabalamaala
2. Object.values()
Definition:
Returns an array of a given object’s property
values.
soumyabalamaala soumyabalamaala
3. Object.entries()
Definition:
Returns an array of a given object’s own
enumerable string-keyed property [key, value]
pairs.
soumyabalamaala soumyabalamaala
4. Object.assign()
Definition:
Copies the values of all enumerable own
properties from one or more source objects to a
target object. It returns the target object.
soumyabalamaala soumyabalamaala
5. Object.freeze()
Definition:
Freezes an object, preventing new properties
from being added, existing properties from
being removed, or existing properties from
being modified.
soumyabalamaala soumyabalamaala
6. Object.seal()
Definition:
Seals an object, preventing new properties from
being added and marking all existing properties
as non-configurable.
soumyabalamaala soumyabalamaala
7. Object.getPrototypeOf()
Definition:
Returns the prototype of the specified object.
soumyabalamaala soumyabalamaala
8. Object.setPrototypeOf()
Definition:
Sets the prototype of a specified object to
another object or null.
soumyabalamaala soumyabalamaala
9. Object.create()
Definition:
Creates a new object with the specified
prototype object and properties.
soumyabalamaala soumyabalamaala
10. Object.create()
Definition:
Creates a new object with the specified
prototype object and properties.
soumyabalamaala soumyabalamaala
11. Object.defineProperty()
Definition:
Adds a property to an object, or modifies an
existing property, and returns the object.
soumyabalamaala soumyabalamaala
12. Object.defineProperties()
Definition:
Defines new properties or modifies existing
properties on an object, and returns the object.
soumyabalamaala soumyabalamaala
Follow for more such
content on JavaScript
[email protected]
soumyabalamaala soumyabalamaala