Question 1: Creating Objects
Which of the following correctly creates an object in JavaScript?
Question 2: Accessing Properties
How do you access the value of property name in the object person?
Question 3: Adding Properties
Which code correctly adds a property age with value 25 to an object user?
Question 4: Object.keys()
What does Object.keys(obj) return?
Question 5: Object.values()
What will the following code output?
Question 6: Checking Property Existence
Which operator checks if an object has a given property?
Question 7: Object.freeze()
What does Object.freeze(obj) do?
Question 8: Object Destructuring
What will this code output?
Question 9: JS For...in Loop
What is the output?
Question 10: Object.assign()
What does Object.assign(target, source) do?