UPDATES VIA   RSS  |  Email Get updates via feedburner Get updates via twitter
Home

Archive for July 29th, 2009

JavaScript: Send function as a parameter to another function (callbacks)

Posted on 29. Jul, 2009 by .

2

I’m sure you’ve seen a lot of code where functions are send as parameters, usually working as function callbacks e.g: setTimeout(function () { alert(‘test’); },1000); But how does the function setTimeout execute the passed function as a parameter? The answer is simple, but I need to provide you an example to understand it Let’s create [...]

Continue Reading