A friend and I had an argument last week. He stated there were no such things as classes in JavaScript.
I said there was as you can say var object = new Object()
He says "as there is no word class
used. It's not a class."
Who is right?
Edit: July 2017
JavaScript classes introduced in ECMAScript 2015 are primarily syntactical sugar over JavaScript's existing prototype-based inheritance. The class syntax is not introducing a new object-oriented inheritance model to JavaScript. JavaScript classes provide a much simpler and clearer syntax to create objects and deal with inheritance.
- Mozilla ES6 Classes: https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Classes
class Rectangle {
constructor(height, width) {
this.height = height;
this.width = width;
}
}