JQuery Programmer Question:
How can you create an Object in JavaScript?
Answer:
JavaScript supports Object concept very well. You can create an object using the object literal as follows −
var emp = {
name: "Jhon",
age: 10
};
var emp = {
name: "Jhon",
age: 10
};
Previous Question | Next 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? |