一旦数据不再有用,最好通过将其值设置为null来释放其引用-----这个做法叫做解除引用。这一做法适用于大多数全局变量和全局变量的属性。局部变量会在他们离开执行环境时自动被解除引用。function a(){}var b = a();//手动解除b的引用b = null Read More
posted @ 2012-09-09 18:47
lein.wang
Views(667)
Comments(0)
Diggs(0)
forfor(var i=0;i<10;i++){ action(i); .................}对于js 来说,由for语句创建的变量i即使在for循环执行结束后,也依旧会存在于循环外部的执行环境中。因为js 没有块级作用域alert(i); // 10 Read More
posted @ 2012-09-09 18:43
lein.wang
Views(108)
Comments(0)
Diggs(0)
result = variable instanceof constructor Read More
posted @ 2012-09-09 18:17
lein.wang
Views(98)
Comments(0)
Diggs(0)

浙公网安备 33010602011771号