Basic JavaScript Question:
Download Job Interview Questions and Answers PDF
How do you assign object properties?
Answer:
obj["age"] = 17;
//or
obj.age = 17;
//or
obj.age = 17;
Download JavaScript Interview Questions And Answers
PDF
Previous Question | Next Question |
How do you create a new object in JavaScript? | What’s a way to append a value to an array? |