INTERACTIVE COURSE · FREE

Object-Oriented Programming in JavaScript: classes and collaboration

Create instances with their own state, protect rules with private fields, and combine inheritance, polymorphism, and composition. Integrate skills in a library with loans, per-user limits, and valid and invalid case tests.

Level
Beginner
Lessons
5
Learning steps
63
UNDERSTAND · PRACTISE · APPLY

Your lesson journey

Each lesson has a purpose. Follow the order or revisit an idea you want to practise.

5 lessons

5 of 5 lessons shown

The numbers show the lesson order, not your progress.

What you will learn

Distinguish classes, instances, object literals, and references. Create instances with new, constructors, and methods. Protect state through private fields, getters, and validated operations. Extend a class with extends and super and override methods. Apply polymorphism using compatible operations across different types. Use composition to coordinate objects with distinct responsibilities. Manage instance collections without exposing mutable internal records. Build and check loans with availability and per-user limits. Debug constructor, private-access, and boundary-condition errors. Justify when a class adds value and when a function or literal suffices.

Before you start

Have completed courses 01 through 13 of Fundamentos de Programación or know variables, types, operators, conditionals, loops, functions, arrays, objects, methods, basic this, references, and debugging techniques. No class experience or additional installations are required.

COURSE CONTEXT

About this course

Read the full description

Five complete lessons with Codi, worked examples, conceptual diagrams, hinted activities and feedback, labs, and a full project reference. Progression moves from classes and constructors to encapsulation, inheritance, polymorphism, and collaboration.

The final library protects collections and availability, defines different limits, and provides query snapshots. It uses classes for behavior and rules, and literals for simple records. OOP is presented as an option alongside functions and object literals, not an obligation.

Programs use modern synchronous JavaScript without packages or external services. An engine supporting private fields is required. Examples are independent: use a fresh context if your console retains previous declarations. Free code and reflections receive no automatic correction. Advanced patterns and prototype internals are not studied.

CONNECT YOUR LEARNING

This course is part of these learning paths

Follow the suggested order or take this course on its own.