110
rated 0 times
[
116]
[
6]
/ answers: 1 / hits: 162879
/ 10 Years ago, thu, july 24, 2014, 12:00:00
I just want to get the return value from setTimeout
but what I get is a whole text format of the function?
function x () {
setTimeout(y = function () {
return 'done';
}, 1000);
return y;
}
console.log(x());
More From » return