From Mozilla documentation I learn about the new operator through this link: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/new
function Car(make, model, year) {
this.make = make;
this.model = model;
this.year = year;
}
const car1 = new Car('Eagle', 'Talon TSi', 1993);
console.log(car1.make);
// expected output: "Eagle"
But I also can do this without using 'this' and 'new' operator by doing:
var Car = (make, model, year) => ({make, model, year})
var car1 = Car('Eagle', 'Talon TSi', 1993)
console.log(car1.make)
If I can accomplish the same result without using 'this' and 'new' operator, then what's the point of using them in the first place? Or do I missed something important? Thanks. I'm sorry for the noob question.