I understood that the best practice with setTimeOut is sending an anonymous function with the function I want to redo inside. Why won't it work?
function movement(dir) {
...
...
setTimeOut(function (){movement(dir);},21);
I understood that the best practice with setTimeOut is sending an anonymous function with the function I want to redo inside. Why won't it work?
function movement(dir) {
...
...
setTimeOut(function (){movement(dir);},21);