I've encountered a little bit of strange behavior with JavaScript whilst trying to get access to an object variable that does exist but not at run-time.
The following shows the initiation of the object which I'm trying to access:
app.examView = new app.ExamView({el: $("#main_wrap"), model: model});
Here is the definition and the call to the object creation where I'm trying to get access to the app.examView variable.
app.ExamView = Backbone.View.extend({
initialize: function(){
this.render();
this.calculatorView = new app.ExamCalculatorView({el: $("#exam_calculator_container"), model: this.model});
this.questionView = new app.ExamQuestionView({el: $("#exam_question"), model: this.model});
Logging the examView variable here returns undefined:
var app = app || {};
app.ExamQuestionView = Backbone.View.extend({
initialize: function(){
console.log(app.examView);
Although, the object is accessible via the console:

Any help would be greatly appreciated.