JQuery Programmer Question:

How can you create an Object in JavaScript?

Tweet Share WhatsApp

Answer:

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

var emp = {
name: "Jhon",
age: 10
};

Read All 201 JQuery Programmer Questions
Previous QuestionNext Question
Where jQuery code is getting executed?How to add the specified class if it is not present, remove the specified class if it is present using jQuery?