Hi,
I am new to jQuery. Can some one explain me the following code? Especially why
call to function message() second time also produces 42?
Thanks
Soundararajan
- var x = 42;
- console.log(x);
- var message = (
- function(x){
- return function(){
- console.log("x is " + x);
- }
- }
- )(x);
- message();
- x = 12;
- console.log(x);
- message();
//***********************************