In JavaScript, a class is syntactical sugar for a function that creates an object.
Javascript uses prototypal inheritance: every object inherits properties & methods from its prototype object.
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Inheritance_and_the_prototype_chain
function Auto(numWheels){
this.numWheels = numWheels
this.type = type
}
Before classes in JavaScript you had constructor functions that looked like this: