An open API service indexing awesome lists of open source software.

https://github.com/khairul25556/js-oop-practice

A simple repository to practice and demonstrate Object-Oriented Programming (OOP) concepts in JavaScript.
https://github.com/khairul25556/js-oop-practice

class-inheritance class-syntax construction function-factory javascript oop-javascript

Last synced: 8 months ago
JSON representation

A simple repository to practice and demonstrate Object-Oriented Programming (OOP) concepts in JavaScript.

Awesome Lists containing this project

README

          

# 🧠 js-oop-practice

A simple repository to practice and demonstrate Object-Oriented Programming (OOP) concepts in JavaScript.
This project covers key OOP fundamentals like:

- Factory Function
- Constructor Function
- Class Syntax
- Class Inheritance using `extends` and `super`

---

## What I learned

- The difference between factory functions, constructor functions, and classes
- How `this` behaves differently with or without the `new` keyword
- How to define methods using prototypes and inside classes
- Creating a base class and extending it using `extends`
- Using `super()` to call the constructor of the parent class
- Organizing and structuring object-oriented code in a cleaner way using ES6 class syntax