Skip to main content
InterviewHubPRO
Section Overview
Q259

Question 259 of 536

Part 5: ES6+ Modern Syntax, Classes, Modules & Destructuring (254 - 328)

48%
JavaScript & V8 Internals (536 Qs)•Part 5: ES6+ Modern Syntax, Classes, Modules & Destructuring (254 - 328)

What is an object initializer

junior LevelCode ExamplejavascriptES6+ Modern Syntax

An object initializer is an expression that describes the initialization of an Object. The syntax for this expression is represented as a comma-delimited list of zero or more pairs of property names and associated values of an object, enclosed in curly braces ({}). This is also known as literal notation. It is one of the ways to create an object.

javascript
  var initObject = { a: "John", b: 50, c: {} };

  console.log(initObject.a); // John