Jump to content

Talk:Immediately invoked function expression

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by 88.90.244.215 (talk) at 19:40, 3 April 2013. The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

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));
v = 2;
 
getValue(); // 1

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