From 65a05bf2d5064ff8ee3d5207a01bd01510ed5a91 Mon Sep 17 00:00:00 2001 From: Joey Wunderlich Date: Thu, 30 May 2019 16:15:38 -0700 Subject: [PATCH] Fix Turtle Spiral example decompilation (#2094) * use local variables for indices * s/an/the/ --- docs/projects/turtle-spiral.md | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/docs/projects/turtle-spiral.md b/docs/projects/turtle-spiral.md index e6d88701..a845d7a7 100644 --- a/docs/projects/turtle-spiral.md +++ b/docs/projects/turtle-spiral.md @@ -2,7 +2,7 @@ ## Setting up your project -This project uses an **microturtle** Extension. You'll need to add it to your project to make it work. +This project uses the **microturtle** Extension. You'll need to add it to your project to make it work. * create a new project * click on the gearwheel menu and click **Extensions** @@ -15,15 +15,14 @@ After the project reloads, you should see the **turtle** category in the blocks. A turtle that spirals into the center of the display and back out again. ```blocks -let index = 0 turtle.setPosition(0, 0) turtle.turnRight() basic.forever(() => { - for (index = 0; index <= 4; index++) { + for (let index = 0; index <= 4; index++) { turtle.forward(4 - index) turtle.turnRight() } - for (index = 0; index <= 4; index++) { + for (let index = 0; index <= 4; index++) { turtle.turnLeft() turtle.back(index) }