I have followed many examples and none are getting me a result.
Thanks in advance
onInit : function(){
$.sap.myVar = "console this";
},
someFunction : function(){
console.log($.sap.myVar);
}
//By declaring like this you can access the variable through out the application