JavaScript Objects Guide
Objects are collections of key-value pairs and the foundation of JavaScript data structures. This guide covers static methods for object manipulation. The guide walks through Property Enumeration, Object Creation & Assignment, Property Descriptors, Prototype & Inheritance. `Object.keys()` returns property names, `Object.values()` returns values, `Object.entries()` returns key-value pairs. `Object.getOwnPropertyNames()` includes non-enumerable properties. `Object.assign()` copies properties from source objects to a target. `Object.create()` creates an object with a specified prototype. `Object.freeze()` makes an object immutable. The guide is organized into 4 sections that build on each other, each pairing a prose explanation with runnable code. Browse the individual methods covered by this guide in the Objects category. Key APIs covered include Object.keys(), Object.values(), Object.entries(), Object.assign(), Object.create(), Object.defineProperty(). Related guides: Arrays, Strings, Numbers, Math, Date. This is one of 145 JavaScript guides on JS Reference — see the full list on the guides page.