I have this code
var draw = function() {
var bx = 0;
var by = 0;
//height
for (var i = 0; i < 11; i++) {
//width
for (var s = 0; s < 10; s++) {
block(bx,by,air);
bx = bx + 50;
}
by = by + 50;
}
What is happening is when I run draw()
it should draw squares in the entire portion of a 10 by 10 plot. However, this is not the case. It is all messed up and I don't know what is happening.
NOTE: this is using processing.js. You can find the complete code here: https://www.khanacademy.org/computer-programming/mc-10/4727460304912384