Skip to content

Files

Latest commit

c271506 · Jun 23, 2024

History

History
29 lines (18 loc) · 465 Bytes

File metadata and controls

29 lines (18 loc) · 465 Bytes

javascript and classes

OOP

object

-collection of properties and methods -toLowercase()

why use OOP

-for DRY (don't repeat yourself)

parts of OOp

object literal

-constructor function -prototypes -classes

  • instances (new,this )

4 pillars

Abstraciton ---(just like fetch ..chze behind the scene ho rhi hoti chupa leta he chze ) Encapsulation (wrap up the data ...hide the data ...private or public ) Inheritance Polymorphism (Many roops )