JavaScript
Object API Reference
JavaScript Object static methods for keys, values, merging and freezing.
By EZ4Code Team
Object
Static methods for working with objects.
Object.keys(obj)Return an array of the object's own enumerable string-keyed properties.
Returns: string[]
Object.values(obj)Return an array of the object's own enumerable property values.
Returns: any[]
Object.entries(obj)Return an array of [key, value] pairs of the object's own enumerable properties.
Returns: [string, any][]
Object.assign(target, ...sources)Copy all enumerable own properties from sources to target. Returns target.
Returns: object
Object.freeze(obj)Freeze an object: prevents adding, removing or modifying properties.
Returns: object
Object.fromEntries(iterable)Transform a list of [key, value] pairs into an object.
Returns: object