for example, I have code like this:
var test = function() {
return Math.random();
}
var randomNumber = test();
// I want to call test() via the randomNumber variable,
// use this variable on another function or etc...
// for example here
for (var i = 0; i < 5; i++) {
console.log(randomNumber); // and it should be show 4 random numbers
}
Is this possible?
Thanks to advance.
randomNumber = test(); console.log(randomNumber);?Object.defineProperty