JavaScript bank Objects & OOP JavaScript / 28 questions Your progress 0 / 28 done Saved in this browser. Reset All 28 Easy 5 Medium 15 Hard 8 Hide done No questions match those filters. 01 Explain the difference between `Object.freeze`, `Object.seal`, and `Object.preventExtensions`. Medium 02 How do property descriptors work? Explain `writable`, `enumerable`, and `configurable`. Hard 03 Implement a deep clone function that also copies getters/setters and handles circular references. Hard 04 Explain the difference between `Object.assign` and the spread operator for merging objects. Easy 05 How do you iterate over an object's keys, values, and entries? Compare `for...in` vs `Object.keys`. Easy 06 Explain optional chaining (`?.`) and nullish coalescing (`??`) with a real-world use case. Easy 07 What are getters and setters? Show how computed properties interact with them. Medium 08 How does `Object.defineProperty` differ from simple assignment when creating properties? Medium 09 Explain object destructuring with default values, renaming, and nested destructuring. Easy 10 Implement a `deepEqual(a, b)` function comparing two objects for structural equality. Medium 11 What is the difference between `Map` and a plain object for key-value storage? Medium 12 Explain WeakMap/WeakSet and why they help prevent memory leaks compared to Map/Set. Hard 13 Explain the prototype chain and how property lookup traverses it. Medium 14 What is the difference between `__proto__`, `Object.getPrototypeOf`, and a function's `.prototype` property? Hard 15 Implement classical inheritance using `Object.create` before ES6 classes existed. Hard 16 Explain how `class` syntax in ES6 is syntactic sugar over prototypal inheritance. Medium 17 What is the difference between prototypal inheritance and classical (class-based) inheritance? Medium 18 How does method resolution work when the same method exists on both an instance and its prototype? Medium 19 Explain `Object.setPrototypeOf` and why it's generally discouraged for performance reasons. Hard 20 Implement a simple `instanceof` operator from scratch using the prototype chain. Hard 21 Explain class fields, private fields (`#field`), and static members introduced in modern JS. Medium 22 How does `super` work in both constructors and methods within class inheritance? Medium 23 Explain the difference between static methods and instance methods, with a practical use case for each. Easy 24 Implement a small class hierarchy (Animal -> Dog -> Puppy) demonstrating method overriding and `super` calls. Medium 25 What are the four pillars of OOP (encapsulation, abstraction, inheritance, polymorphism) and how does JS support each? Medium 26 Explain mixins in JavaScript and how they help work around the single-inheritance limitation of classes. Hard 27 What are abstract classes in JS (which has no native support), and how would you simulate one? Medium 28 Explain how private class fields differ from closures for achieving encapsulation. Medium ← Previous Fundamentals Next → Data Structures