setTimeout takes arguments?
Read on dropshado.ws that setTimeout takes extra arguments http://dropshado.ws/post/2325298069/extra-parameters-in-settimeout Testing out browser support
by John Schulz
HTML
<div id="log"></div>
JavaScript
function log() {
var msg = ([]).slice.call(arguments).join(' ');
if (!log.el){ log.el = document.getElementById('log'); }
log.el.innerHTML += '<p>'+ msg +'</p>';
}
function fn() {
if (window.console){ console.log('args', arguments); }
log('called with', arguments.length, 'arguments');
}
setTimeout(fn, 1000, 1, 2, 3, 4, 5, 6);
setTimeout(fn, 1000, [1, 2, 3, 4, 5, 6]);
setTimeout(fn, 1000, [1, 2, 3], [4, 5, 6]);