On this page
Object
Prev: builtins | Up: builtins | Next: Array
Rel: Object & Reflect Guide, Prototype Chain & new Flow
Ref: MDN Web Docs — Object
Tags: #public #web #javascript #builtins #object #index
Overview
Root constructor and static utilities for inspecting, copying, freezing, and linking JavaScript objects.
Core (#tier/core)
- Object.keys — Returns an array of
obj's own enumerable string-keyed property names. - Object.values — Returns an array of
obj's own enumerable property values. - Object.entries — Returns an array of
[key, value]pairs forobj's own enumerable string properties. - Object.fromEntries — Transforms an iterable of
[key, value]pairs (e.g.,MaporURLSearchParams) into a plain object. - Object.hasOwn — Returns
trueifobjhaspropas its own (non-inherited) property (ES2022).
Standard (#tier/standard)
- Object.assign — Copies own enumerable properties from one or more sources into
target(mutatingtarget). - Object.create — Creates a new object with the specified prototype (
Object.create(null)creates a dictionary with no prototype). - Object.freeze — Prevents adding, removing, or modifying own properties of
obj(shallow immutability). - Object.groupBy — Groups elements of an iterable into a null-prototype object keyed by
callbackFn(item, index)(ES2024). - Object.is — SameValue equality: like
===, exceptObject.is(NaN, NaN)istrueandObject.is(+0, -0)isfalse.
Specialized (#tier/specialized)
- Object.getPrototypeOf — Returns the internal prototype of
obj(ornullforObject.prototype). - Object.defineProperty — Defines or modifies a property with explicit descriptor flags (
value,writable,enumerable,configurable,get/set).
Legacy / Avoid (#tier/legacy)
- Object.hasOwnProperty — Prototype method checking own property existence; breaks on
Object.create(null)or shadowed property names. Prefer Object.hasOwn().
Linked from
- tuts/javascript/builtins
- tuts/javascript/builtins/Array
- tuts/javascript/builtins/Object/assign
- tuts/javascript/builtins/Object/create
- tuts/javascript/builtins/Object/defineProperty
- tuts/javascript/builtins/Object/entries
- tuts/javascript/builtins/Object/freeze
- tuts/javascript/builtins/Object/fromEntries
- tuts/javascript/builtins/Object/getPrototypeOf
- tuts/javascript/builtins/Object/groupBy
- tuts/javascript/builtins/Object/hasOwn
- tuts/javascript/builtins/Object/hasOwnProperty
- tuts/javascript/builtins/Object/is
- tuts/javascript/builtins/Object/keys
- tuts/javascript/builtins/Object/values
Related notes
- tuts/javascript/builtins Linked here; links to this page; shared tags: #builtins, #index, #javascript, #web
- tuts/javascript/builtins/Array Linked here; links to this page; shared tags: #builtins, #index, #javascript, #web
- tuts/javascript/builtins/Object/assign Linked here; links to this page; shared tags: #builtins, #javascript, #object, #web
- tuts/javascript/builtins/Object/create Linked here; links to this page; shared tags: #builtins, #javascript, #object, #web
- tuts/javascript/builtins/Object/defineProperty Linked here; links to this page; shared tags: #builtins, #javascript, #object, #web
- tuts/javascript/builtins/Object/entries Linked here; links to this page; shared tags: #builtins, #javascript, #object, #web
- tuts/javascript/builtins/Object/freeze Linked here; links to this page; shared tags: #builtins, #javascript, #object, #web
- tuts/javascript/builtins/Object/fromEntries Linked here; links to this page; shared tags: #builtins, #javascript, #object, #web
- tuts/javascript/builtins/Object/getPrototypeOf Linked here; links to this page; shared tags: #builtins, #javascript, #object, #web
- tuts/javascript/builtins/Object/groupBy Linked here; links to this page; shared tags: #builtins, #javascript, #object, #web