My son put the console.log command in to test if the program is running. However, it didn’t show in the debug console. But he doesn’t think he made an error in the code. Please let me know if there’s any further information needed to help.
The error is in the “return 0;” line. If you remove it, it runs pretty well but does seem to skip some of the slides. I had better luck with the traditional counter pattern of slides=slides+1 OR (slides+=1).
Not sure what was desired with the return 0; line? Perhaps he can achieve his desired results another way?
Hope that helps!
Thanks–this got him past that problem. Now he says he changed the slide function 2 to make a sprite visible, and now it’s skipping over slide 2. A test showed that it’s not skipping slide 2, but going over it very fast.
Have him look at “keyWentDown” instead of “keyDown” The “keyDown” can be triggered repeatedly by holding the key down where as “keyWentDown” should only trigger once each time you press the key.
Hope that helps a little.