Scenario: I got an alert() saying undefined when I (try to) set the myVar variable through the Constructor. However i
alert()
undefined
myVar
Options passed into the constructor are automatically stored as this.options
this.options
var myView = Backbone.View.extend({ myVar : 'Hello from inside', initialize: function() { alert(this.options.myVar); } )}; new myView({myVar: 'Hello from outside'});