How to define global variable in sencha
问题 I am try to global variable in one entire view, could not done it. initialize : function(){ this.callParent(); this.nameValue=0; if(name="ram") this.nameValue=1; console.log("Test 1 -"+this.nameValue); }else { this.nameValue=0; console.log("Test 2 -"+this.nameValue); } } it would be access value form button tap like this: onSubmitButtonTap: function () { console.log("Button Tap Here"); console.log("Test Def-6-"+this.nameValue); } But i could not access it, it display always 0. I have gave