JAVASCRIPT中的作用域和原型链,应该算是难点了,要好好多学学,练练

时间:2022-09-16 08:11:18

今天初六,要上班啦。。。

JAVASCRIPT,看来是丢不了了。。

http://www.dengdeng90.com/wordpress/?p=241

http://www.cnblogs.com/TomXu/archive/2011/12/15/2288411.html

http://www.cnblogs.com/wangfupeng1988/p/3977924.html

<script>
console.log(Object.getOwnPropertyNames(Object.prototype));
function Empty() {}
console.log(Function.prototype, Function.__proto__);
console.log(Object.prototype, Object.__proto__);
function F() {};
F.prototype = {
  a: function() {}
};
F.prototype.constructor = F;
console.log(F.prototype, F.__proto__);
var o = new Object();
console.log(o.prototype, o.__proto__);
var i = new F();
console.log(i.prototype, i.__proto__);
</script>

JAVASCRIPT中的作用域和原型链,应该算是难点了,要好好多学学,练练