随笔分类 - js
摘要:// this 代表的是函数前边那个点左边的那个东西 Student.prototype.update = function(name, sexy) { this.name = name this.sexy = sexy}var obj = new Student(); // 此时 this 代表的
阅读全文
摘要:var fun = function(x) { if (x < 1) { return x; } else { return -x; } } // 自动测试 function ensure(condition, message) { if (!condition) { console.log(message) } } // 运行testFun(),发现结果不符自动输出错误...
阅读全文
摘要:console.log() 显示运行路径/显示相关参数
阅读全文
浙公网安备 33010602011771号