loop

This function is invoked 30 times per second. It is good for creating animations. You can review animate for animation examples.

Function defition and usage is like that:

function loop(){
    // codes will be executed
}