I have the following code:
var foo=5; var los= function (){ alert(foo);}; setInterval(los, 1000);
which works correctly.
If I
Because you're executing los() and then the result of that (single) execution is passed into the setInterval function.
los()
setInterval
setInterval requires a function passed in, not undefined, which is what los returns. However, it doesn't complain - it just doesn't do anything.
undefined
los