"The above code uses an IIFE (Immediately-invoked function expression) to produce a function with additional data"<p>I'm probably being a mindless pedant, but...<p>Having read the linked (Alman) article, I think this terminology is iffy at best. This is just a closure. You are using a second function to create a lexical scoping, but a closure without lexical scope is just an anonymous function. (Full name of a closure being a lexical closure).<p>If JavaScript had a 'let' construct to allow for lexical scoping without creating anonymous functions, this would be fairly easy to see.<p>But I think adding new terminology such as 'IFFE' obscures what a closure actually is.