The following is my code, it will call tick(a function which will print something on console) per second
function tick() {
console.log("djfiah");
}
windowa.onload(){
var id = setInterval(tick, 1000);
}
If the code become
var id = setInterval(tick(), 1000);
Why the tick will be called only once?