object {}
Stores key-value pairs.
Syntax
const name = { key: value }Description
Objects are created using curly braces. Values are accessed with dot notation (object.key) or square brackets (object['key']).
Returns
Object.
Example
Loading editor…
Expected output
Alex
{ name: 'Alex', age: 36, city: 'London' }When to use?
Storing entity properties (user, product); JSON data.