A short question from JavaScript about this

var a = 10;
var obj1 = {
    a: 20,
    fn: (function() {
        this.a *= 2;
        a = 5;
        var a = 6;
        return function() {
            this.a *= a;
            console.log(a)
        }
    })()
}
var obj2 = {
    a: 30
}
var fn = obj1.fn;
fn();  //6???
obj1.fn();  //6???
obj1.fn.call(obj2);  //6???

as shown above, after the function runs, the result is 6, respectively, but I don"t understand why it is 6. Even if an equals 6 after var a = 6, then why is an equal to 6 after this.a * = a? Ask the great god for advice.


  Recursive, precompiled  
 
					
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b38179-2b862.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b38179-2b862.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?