For Of Loops


var items = ['hat', 'glove', 'ball', 'bat'];

for (var item of items) {
  console.log("did you bring your: " + items + " ?");

Example 2:

var appleSizes = [50, 60, 55, 50, 62, 66, 70];
fill(255, 0, 0, 0.1); //transparent red

for (var size of appleSizes) {
  ellipse(250,250,size, size);

For Of Loops courses

Introduction to Scratch: Simple Projects

In this course you will become familiar with the Scratch programming environment by building a collection of simple games.

Intro to Scratch: Assorted Games

Learn the basics of the Scratch programming language by building a collection of simple games.

Helicopter Game

Create a game where the player pilots a helicopter with the mouse and collects coins while avoiding obstacles

For Of Loops lessons

Scrolling Spirals

Create spiral artwork that changes color and scrolls across the screen.

Personality Quiz

Make a personality quiz on a website to find out what kind of animal you are!

Helicopter Game: Movement and Coins

In the first part of this course we will be making a simplified version of the game which allows the player to move and to collect coins

Related Links

No links found
About For Of Loops

Iterate through a loop of items


For Of Loops