Get a Backbone Model instance's model/class name
问题 Given an instance of Backbone model, how can I know the "class" (so to speak) of this instance ? For instance: class Car extends Backbone.Model mycar = new Car() And what I need is: mycar.modelName # => 'Car' 回答1: It's problematic in general, I think. I was going to suggest some of the options mentioned here ( How do I get the name of an object's type in JavaScript? ) but I was having issues with the first option. You could always extend all your models to have a function that returned a