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
What is the purpose of JavaScript prototypes?
How do you add a method to an existing object's prototype?
What is the result of the following code?
How do you create an object that inherits from another object?
What does Object.create() do in JavaScript?
Which of the following methods can be used to copy an object in JavaScript?
What is the result of the following code?
Which method returns the prototype of an object?
Which of the following statements is true about prototypes?
How do you check if an object has a specific property and not from its prototype chain?
What is the purpose of JavaScript prototypes?
How do you add a method to an existing object's prototype?
What is the result of the following code?
function Person(name) { this.name = name; } Person.prototype.greet = function() { return "Hello, " + this.name; }; var person = new Person("John"); console.log(person.greet());
How do you create an object that inherits from another object?
What does Object.create() do in JavaScript?
Which of the following methods can be used to copy an object in JavaScript?
What is the result of the following code?
var obj1 = { a: 1 }; var obj2 = Object.create(obj1); console.log(obj2.a);