3 ms·
Which it is worth pointing out has (relatively recently, in 2015's ES6) added classes too – which are mostly just syntactic sugar for prototypes (but not entire
by skissane 4y ago
Which it is worth pointing out has (relatively recently, in 2015's ES6) added classes too – which are mostly just syntactic sugar for prototypes (but not entirely, since they also add some new semantics for which there is no equivalent in pure prototype-based code.) Looking to the future, they are likely to add more new semantics and syntax to classes, which will have no direct equivalent in pure prototypes, causing JavaScript/ECMAScript to evolve from a purely prototype-based language into more of a hybrid between prototype-based and class-based OO.