Open In App

How to Create an Empty Object in JavaScript ?

In JavaScript, We can create an empty object using curly braces {} and the Object constructor.

Example: Using curly braces {} and we are not intializing with any value as we want an empty object.






let emptyObject = {};

Example: Using Object constructor.




let anotherEmptyObject = new Object();

Both approaches result in the creation of an empty object. Once you have an empty object, you can later add properties and values to it as needed.



Article Tags :