Instructions
- 1. Your final score will reflect your grasp of the concepts—approach each question with precision.
- 2. Thoroughly review each solution before proceeding to ensure full understanding.
- 3. Final results will be available after submission to provide insights into areas for further improvement.
- 4. Maintain academic integrity—plagiarism undermines learning and professional growth.
- 5. Once submitted, responses are final, so ensure you’re confident in your answers.
- 6. These challenges are designed to test practical knowledge; apply your skills as you would in real-world scenarios.
All Problems
Question
Action
How do you check if an object has a specific property?
What does the following code return?
What does Object.keys() return?
What is the result of the following code?
Which method returns an array of the object's property values?
How do you create a new object that inherits properties from another object?
What does the following code return?
Which method freezes an object, preventing any changes to it?
Which method only prevents new properties from being added to an object but allows modification of existing properties?
What is the output of the following code?
How do you check if an object has a specific property?
What does the following code return?
const obj = { name: "Alice", age: 25 }; console.log("name" in obj);
What does Object.keys() return?
What is the result of the following code?
const person = { name: "John", age: 30 }; const keys = Object.keys(person); console.log(keys);
Which method returns an array of the object's property values?
How do you create a new object that inherits properties from another object?
What does the following code return?
const person = { name: "Jane", age: 25 }; const entries = Object.entries(person); console.log(entries);
Which method freezes an object, preventing any changes to it?
Which method only prevents new properties from being added to an object but allows modification of existing properties?
What is the output of the following code?
const person = { name: "John" }; Object.freeze(person); person.name = "Jane"; console.log(person.name);