How can you create an Object in JavaScript?

1 Answer(s)

JavaScript supports Object concept very well. You can create an object using the object literal as follows −

var emp = {
   name: "Zara",
   age: 10
};
Supporter Answered on August 15, 2019.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.