new SomeClass().get(function(resultvariable){
console.log(resultvariable); // works
});
How could the "resultvariable" be used outside of the class function ?
new SomeClass().get(function(resultvariable){
console.log(resultvariable); // works
});
How could the "resultvariable" be used outside of the class function ?
Declare a global variable outside of the class. Then assign the value of resultvariable
to that global variable.
var globalVariable;
new SomeClass().get(function(resultvariable){
console.log(resultvariable); // works
globalVariable = resultvariable;
});