Just came across this. It s not affecting anything really but i m wondering why it s happening.
If I run the following code in firefox with firebug on:
setInterval(function(param)
{
console.log("param is %o",param)
},500);
param seems to be assigned a vaguely random value:
param is -2
param is -1
param is -2
param is 1
param is -1
param is 6
param is -1
param is 0
param is -2
param is 2
param is 0
param is 2
param is 0
param is 0
param is 0
[..]
param is 0
param is 0
param is 0
param is 0
param is 0
param is 0
param is 0
param is 911
param is 0
param is 0
param is 0
param is -1
I do appreciate that I m not passing any argument to setInterval to pass on to the function, but why does javascript chooses to pass this random number ?
I would have expected undefined or something like that...
Cheers
p.s. Haven t tested in other browsers