1.
What is the correct way to create an object in JavaScript?
2.
How do you access the value of the name property in the object var person = {name: 'John', age: 30};?
3.
How do you add a new property gender with value male to the person object?
4.
How can you delete the age property from the person object?
5.
What will the following code output? console.log(person['age']); if var person = {name: 'John'};
6.
How do you define a method named greet in an object var person = {};?
7.
What does Object.keys(person) return if var person = {name: 'John', age: 30};?
8.
How can you check if the age property exists in the person object?
9.
What will console.log(car.make); output if var car = {make: 'Toyota', model: 'Corolla'};?
10.
How do you iterate over all properties of an object var person = {name: 'John', age: 30};?