Week 6 — OOP JavaScript & DSA Practice Begins

intermediate oops dsa

Goal: “Knowledge is of no value unless you put it into practice.” — DSA theory is done. From this week on, Track A is pure coding practice — 2-3 problems per session. Meanwhile, we tackle OOP through JavaScript’s unique prototypal lens.

Topics

DayTrackFocusTopics
MonA — DSA PracticeArrays, Two Pointers, Sliding WindowSolve 2-3 problems from Weeks 1-5 topics. No new theory — just code.
TueB — OOP (JS)Foundations & InheritanceObjects Fundamentals · Constructor Functions and new · Prototypes and Prototype Chain · ES6 Classes · Inheritance (extends & super)
WedA — DSA PracticeBinary Search, Stacks, TreesSolve 2-3 problems. Mix easy and medium difficulty.
ThuB — OOP (JS)Encapsulation & AdvancedEncapsulation and Private Fields · Polymorphism in JavaScript · Abstraction Patterns · this Keyword and Context · Getters, Setters, and Proxy
FriB — OOP (JS)Composition & PrinciplesMixins and Composition · Symbols and Well-Known Protocols · SOLID Principles in JavaScript · Design Patterns for OOP

Key Concepts

  • Prototypal inheritance is how JS does OOP under the hood — classes are just syntactic sugar over prototype chains. Understanding __proto__, prototype, and Object.create() is essential.
  • Private fields (#field) are truly private in modern JS — no workaround to access them from outside. This is different from the older _convention approach.
  • this in JavaScript is determined by how a function is called, not where it’s defined. Arrow functions inherit this from their enclosing scope — that’s the key difference.
  • Composition over inheritance is a principle we’ll see everywhere in real-world codebases. Mixins are JS’s way of achieving this.
  • SOLID principles apply to any OOP language. In JS interviews, expect questions about Single Responsibility and Open/Closed principles specifically.

Practice

  • DSA: Solve 5-6 problems this week — mix of easy/medium from arrays, two pointers, binary search, stacks, and trees
  • OOP: Implement a small class hierarchy using both prototypes and ES6 classes — e.g., a Shape base with Circle and Rectangle subclasses
  • OOP: Create a mixin that adds serialization (toJSON/fromJSON) to any class

~14 OOP topics + DSA practice · ~2 hrs/day · JS OOP = revision, DSA = daily grind