Object

The Object type is used to represent arbitrary collections of properties.

Objects can be created using the object literal, for example, { temperature: 27, unit: "C" }, the constructor function, for example, new Object({ temperature: 27, unit: "C" }), or Object.fromEntries, for example, Object.fromEntries([["temperature", 27], ["unit", "C"]]).

Syntax

Object

Properties

Prototype Properties