shashawang
shashawang
等号用“==”。==可以对等式左右的类型进行灵活转换,但严格模式下(===)并不真的相等。犀牛书P50讲到这点。
两行代码第一次执行结果相同。 继续执行output(obj),调用output函数,值依次增加;执行console.log(obj.count);返回结果的是上次调用函数返回的obj值,不会继续调用函数,因此值不会增加;  我自己没想到怎么修改,分析其他同学答案: MyColourfulLife提到了两种方法: 1. 函数定义完就使用,用完立即销毁; 2. 通过创建和原对象内容一样的新对象,把内容修改和原内容独立开,和李想童鞋的代码一个意思
王沙沙: 仓库地址:https://github.com/shashawang/getting-started-with-javascript/tree/master/homework/lesson1 网页地址:https://shashawang.github.io/my-first-webpage/
王沙沙(更新): 仓库地址:https://github.com/shashawang/first-javascript-project 网页地址:https://shashawang.github.io/my-first-webpage/
9月3日11:00am进度: 1.第五、六课作业完成,还没Pr,待会先继续第七课作业; 2.函数补课38min-45min对我有难度,理解后(我觉得)记录了听课笔记;