javascript es6 check object is of type class code example Example: how to check which class a object is from if (obj instanceof C) { //your code }