oojs
oojs copied to clipboard
感谢大师
执行`parseInt('0377')` 结果是0377, 书上的结果是255
第三章 函数 第63页有错误 “” function args(){ return arguments; } args(1,2,3,4,ture,'ninja'); “” 会返回错误 Uncaught ReferenceError: ture is not defined 另外,该文上述“arguments变量,该变量为内建对象,每个函数中都能调用。**_它能返回函数所接收的所有参数_**。不妥,arguments只是保存了参数,而不是它能够返回,是你return才返回。
第117页讲解数组的splice()方法时,原文为“该方法的头两个参数所指定的是要移除切片的首尾索引位置”,但实际第二个参数所指定的是要移除的项目的数量。
P182 var const = this.constructor; return const.uber ? this.const.uber.toString() + ', ' + this.name : this.name; =>(Uncaught TypeError: Cannot read property 'uber' of undefined) var result = []; if(this.constructor.uber){ result[result.length]...
一开始提到计算从2016年到2036年有多少个6月20日是星期一, 在下面的循环代码中, status[new Date(i , 5, 20).getDay()]++; 5应该改为6
194页object()倒数第九行,只有triangle继承了twoDee,而twoDee却没有继承shape,所以按照原书说法,triangle.toString()是不存在的。 应该在倒数第九行前添加 『var twoDee = object(shape); twoDee.name = "2D shape"; twoDee.toString = function(){ return this.uber.toString()+', '+this.name; } 』 应是原著没有写明。 197页倒数第11行处,原文 『 if(stuff has Own Property(1) ) 』 应更正为『 if(stuff hasOwnProperty(i)...