JavaScript prototypes and inheritance MCQs

Asynchronous JavaScript Quiz

1. What is the main feature of prototypal inheritance in JavaScript?

2. What does the Object.create() method do in JavaScript?

3. What is the purpose of the Object.assign() method?

4. How do JavaScript objects inherit properties from other objects?

5. What is the purpose of the prototype property in JavaScript?

6. How does prototypal inheritance differ from classical inheritance?

7. What does the constructor property of an object reference?

8. If you create an object using Object.create(proto), what does it inherit?

9. What is the result of using Object.assign() on two objects?

10. How can you access the prototype of an object in JavaScript?

11. What does the __proto__ property represent in JavaScript?

12. What happens to properties when an object is created with Object.create()?

13. How can you set an object's prototype in JavaScript?

14. What can be added to a prototype in JavaScript?

15. What is a key advantage of prototypal inheritance?

16. Can functions be added to the prototype of an object in JavaScript?

17. What does the 'instanceof' operator do in JavaScript?

18. How can an object created from a constructor function inherit properties?

19. What happens if a property is not found in an object during property access?

20. How does Object.create() facilitate inheritance in JavaScript?

Post a Comment

Your comment will be visible after approval.
© TechTestLog. All rights reserved. Premium By Raushan Design
//My script