Javascript OOP Prototype: Functional or OOP, you use it every day!
As you know from this blog post, classes are just functions in disguise. We used this syntax:
function Animal(rating) {
this.rating = rating
}
Animal.prototype.run = function() {
console.log("I run")
}
But why do we use Animal.prototype in...
raghavsinghgulia.hashnode.dev3 min read
Jan Guardian
I like it how you call ES6 that appeared in 2015
The new syntax