OOP allows you to model real-world entities using objects and classes. It helps organize complex applications.
class User {
constructor(name, skill){
this.name = name;
this.skill = skill;
}
greet(){
console.log("Hello " + this.name);
}
}
let u = new User("Yusuf", "JS");
u.greet();