How to check if an object is of a particular class in JavaScript?
Originally posted here!
To check if an object or an instance belongs to a certain class you need to use the instanceof operator.
To understand it better let's create a class User and instance of User class called John.
// class User
class User {
s...
melvingeorge-me.hashnode.dev3 min read