Step 7: Duplicate Code

Goal:


Background1 and background2 have almost identical code so it’s much easier to copy the code than to start over for the second background.

Knowing how to properly copy code is one of the most important skills of programming.

Steps:

  1. Left click and hold down on the When green flag clicked block, and drag the whole code block into the sprite called background2.

Code:


Click to replay