flâneur — a map of the web's best reading

Object initializer - JavaScript | MDN

developer.mozilla.org · 1,567 words · saved by 1 readers

Objects can be initialized using new Object(), Object.create(), or using the literal notation (initializer notation). An object initializer is a comma-delimited list of zero or more pairs of property names and associated values of an object, enclosed in curly braces ({}).

Object initializer - JavaScript | MDN Skip to main content Skip to search Object initializer Baseline Widely available This feature is well established and works across many devices and browser versions. It’s been available across browsers since July 2015. Learn more See full compatibility An object initializer is a comma-delimited list of zero or more pairs of property names and associated values of an object, enclosed in curly braces ( {} ). Objects can also be initialized using Object.create() or by invoking a constructor function with the new operator. Try it const object1 = { a: "foo", b:

Explore this link on the map →

saved by

related reading