Cognizant Interview Question

Explain Javascript classes (are they actually classes?).

Interview Answer

Anonymous

Feb 27, 2018

This is an ES6 concept, they aren't actually classes but instead another word that is used to declare a constructor and prototype/static methods associated with it. It could also be used to create an object with methods but no constructor, although that is better done through a module export.