To have a deep understanding of Javascript by some questions gathering from websites.
Key word “this”
Q1
Given codes:1
2
3
4
5
6
7
8
9var a=10;
function test(){
a=5;
alert(a);
alert(this.a);
var a;
alert(this.a);
alert(a);
}
What’s the output of test() and new test()?
http://blog.csdn.net/qq29655344/article/details/77145832
http://www.cnblogs.com/chenjinxinlove/p/6249593.html
http://t240178168.iteye.com/blog/1633344
https://www.jianshu.com/p/08e1b15bc883