Expert Developer JavaScript Question: Download Expert JavaScript Developer PDF

How are object properties assigned?

Tweet Share WhatsApp

Answer:

Properties are assigned to objects in the following way -

obj["class"] = 12;

or

obj.class = 12;

Download Expert JavaScript Developer PDF Read All 150 Expert JavaScript Developer Questions
Previous QuestionNext Question
How to find operating system in the client machine using JavaScript?What are JavaScript types?