Is it possible to access javascript return value outside of function? [on hold]
- by Kinnard Hockenhull
How would one access javascript function's return value outside of the function? For example could you tell a function to return something somewhere else in the code? Theoretical example:
milkmachine = function(argument){
var r;
var k;
//do something with arguments and variables
return r;
}
var rainbow = milkmachine(); //rainbow == r
milkmachine.return(k);
var spectrum = milkmachine(); //spectrum == k