Hi everyone,
I'm learning about JavaScript classes, but I'm a little confused, and I'm hoping someone can help me out. I learned about constructors a few months ago, and from my understanding, they are used to create objects. You pass data into them, and it forms an object. However, with Classes, it appears to do the same thing, right? What are their purpose and use cases, and why would I use a class over just a regular constructor?
I'm learning about JavaScript classes, but I'm a little confused, and I'm hoping someone can help me out. I learned about constructors a few months ago, and from my understanding, they are used to create objects. You pass data into them, and it forms an object. However, with Classes, it appears to do the same thing, right? What are their purpose and use cases, and why would I use a class over just a regular constructor?