3 ms·
Why not to write it in a much simplier way? Like this: function bar(n) { // still has dependency on q, r, s } foo(..., bar);
by svetlyak40wt 16y ago
Why not to write it in a much simplier way? Like this:
function bar(n) {
// still has dependency on q, r, s
}
foo(..., bar);
- mjs 16y agoYeah, that's nicer if bar() can be defined at the same "level" as foo() but if it makes more sense to move it somewhere else the closed-over variables need to be passed.