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...

Markdown supported Β· ββ΅ to post
Raghav Singh Gulia
Jan Guardian
I like it how you call ES6 that appeared in 2015
The new syntax