Is there a JavaScript equivalent of Java\'s class.getName()?
class.getName()
A little trick I use:
function Square(){ this.className = "Square"; this.corners = 4; } var MySquare = new Square(); console.log(MySquare.className); // "Square"