DEV Community

Discussion on: JavaScript Classes

 
mcarpenter profile image
Matthew Carpenter

It’s would just give that class a name. If I were to console.log(“car.name”), it would return “Toyota”. The name is local to the classes body.

Thread Thread
 
z2lai profile image
z2lai

Ah, I think I understand all the confusing bits about class, thanks for teaching me!