Created
September 28, 2015 22:14
-
-
Save claytical/5c2bc3ac46c9e78c0c64 to your computer and use it in GitHub Desktop.
Nested For Loop Example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function setup() { | |
| createCanvas(windowWidth, windowHeight); | |
| } | |
| function draw() { | |
| background(0); | |
| noFill(); | |
| stroke(255); | |
| for (var x = 0; x < width; x+=5) { | |
| for (var y = 0; y < height; y+=5) { | |
| rect(x, y, 2, 2); | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment