Talk:Immediately-invoked function expression

From Wikipedia, the free encyclopedia
Jump to: navigation, search

Note that code samples from Alman's page are licensed under the GPL and so may be used with attribution.

This code snippet is incorrect:

var v, getValue;
v = 1;
getValue = (function(v) {
  return v;
v = 2;
getValue(); // 1

`getValue` is the number 1, not a function. (talk) 19:40, 3 April 2013 (UTC) Later yo