User Tools

Site Tools


javascript

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
javascript [2008/05/24 19:38]
ach removed
javascript [2009/10/15 14:24] (current)
andi created
Line 1: Line 1:
 +====== JavaScript Snippets ======
  
 +Fixing the variable scope in looped closure constructs
 +
 +<code javascript>​
 +function fix (fnc) {
 +    var args = Array.prototype.slice.call(arguments,​ 1);
 +    return function() {
 +        return fnc.apply(this,​ args);
 +    }
 +}
 +</​code>​
javascript.txt ยท Last modified: 2009/10/15 14:24 by andi