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.
- Host: GitHub
- URL: https://github.com/khairul25556/js-oop-practice
- Owner: Khairul25556
- Created: 2025-04-07T17:01:34.000Z (8 months ago)
- Default Branch: main
- Last Pushed: 2025-04-08T13:37:25.000Z (8 months ago)
- Last Synced: 2025-04-11T04:43:50.598Z (8 months ago)
- Topics: class-inheritance, class-syntax, construction, function-factory, javascript, oop-javascript
- Language: JavaScript
- Homepage:
- Size: 3.91 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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