This is my 2nd year teaching CS Discoveries and I use the exemplars to help but really want to understand why the following code make the pear stop growing? I get the set.animation to change to a pear, not how to make it stop growing. Thanks in advance!!
fruit.scale = fruit.scale + 0.01;
if (fruit.scale > 2) {
fruit.setAnimation(“pear”);
fruit.scale = fruit.scale - 0.01;
}
This is the code that I used to make the pear stop growing.