Function


#1

function wrapValue(n)
{
var localVariable = n;
return function()
{ return localVariable; };
}
var wrap1 = wrapValue(100);
var wrap2 = wrapValue(2);
console.log(wrap1());
console.log(wrap2());


#2

can you please post the link of that lesson?

Do you have any question?


#3

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.