摘要: caller是function的属性callee是arguments的属性callee:返回正在执行的函数对象。var sum = function (n) { if (1 == n) return 1; else return n + sum(n - 1); } console.log(sum(100)); var sum = function (n) { if (1 == n) return 1; else return n + arguments.callee(n - 1)... 阅读全文
posted @ 2013-09-04 16:30 hongdada 阅读(255) 评论(0) 推荐(0) 编辑
摘要: 1.变量 var x = 10; Object.prototype.y = 20; var w = 33; console.log(x); console.log(y); (function () { var x=100; var y = 30; w=44; console.log(x); console.log(window.x); console.log(y); console.log(w); ... 阅读全文
posted @ 2013-09-04 15:40 hongdada 阅读(270) 评论(0) 推荐(0) 编辑