摘要:
今天看到了一道很有意思的面试题,在听完老师的讲解后,我决定也和大家讲讲这道题 var x = 0 function foo(x, y = function() { x = 3; console.log(x) }) { console.log(x) var x = 2 y() console.log( 阅读全文
摘要:
JavaScript中实现继承的6种方案 01-原型链的继承方案 function Person(){ this.name="czx"; } function Student(){} var p1=new Person(); Student.prototype=p1; var student1=ne 阅读全文