Is there any possible way to achieve the abstraction in JavaScript world like we have in OOPS?
The abstract class will serve as base and we will create concrete components out of it. And how to implement the interfaces concepts in JavaScript?
Is there any possible way to achieve the abstraction in JavaScript world like we have in OOPS?
The abstract class will serve as base and we will create concrete components out of it. And how to implement the interfaces concepts in JavaScript?
It makes little sense to have interfaces or abstract classes, as there are no typechecks.:
function fn(sth) { console.log(sth.age); }
fn(new Person());
fn(new Animal());
If you want typechecks, including interfaces, use TypeScript