已采纳回答 / fishmice
data.double = 2; 必须限定在 if(fruit.fruitType[i] == "blue") 的大括号{}里,如果不小心写到外面了,可能就会导致大鱼碰到黄色果实,double也变为2
2016-03-20
跟下来了
Demo: https://huanyouchen.github.io/demo/imooc/tinyHeart/tinyHeart.html
代码: https://github.com/guihailiuli/imooc-practice/tree/master/tinyHeart
Demo: https://huanyouchen.github.io/demo/imooc/tinyHeart/tinyHeart.html
代码: https://github.com/guihailiuli/imooc-practice/tree/master/tinyHeart
2016-03-10