There is really no such thing as a “class” in javascript — everything but primitives are an object. Even functions are objects.
instanceof DOES work with functions though. Check out this link.
function Car(make, model, year)
{
this.make = make;
this.model = model;
this.year = year;
}
var mycar = new Car("Honda", "Accord", 1998);
var a = mycar instanceof Car; // returns true
var b = mycar instanceof Object; // returns true