Why does my code not work

let x_vals = []; //List of x-values
let y_vals = [];
let shapeDone = 0; //When shapeDone = 0, the shape has not been completed. When shapeDone = 1, the shape is completed.
let numberOfSides = 0;
let area=0;
var listOfAllCoordinatesz=[];
let areaNotYetMultipliedByHalf = 0;
let perimeter = 0;

function setup() {// Sets up background
  createCanvas(windowWidth, windowHeight);
  background(100);
  clear();
}

function draw() {
  for(int x=0, x++, x<1000 ;){
    ellipse(x , 0, 10, 10);
  }
}
let x_vals = []; //List of x-values
let y_vals = [];
let shapeDone = 0; //When shapeDone = 0, the shape has not been completed. When shapeDone = 1, the shape is completed.
let numberOfSides = 0;
let area=0;
var listOfAllCoordinatesz=[];
let areaNotYetMultipliedByHalf = 0;
let perimeter = 0;

function setup() {// Sets up background
  createCanvas(windowWidth, windowHeight);
  background(100);
  clear();
}

function draw() {
  for(int x=0, x<1000, x++, ;){
    ellipse(x , 0, 10, 10);
  }
}

What are you trying to do? What is it doing instead? Are you getting an error message?

Did you mean to paste your code twice? Are there differences between the two sketches?

There are a couple of errors with your for() loop:

  1. Variables in p5 are declared with ‘var’ not ‘int’

  2. The expressions in the for() statement should be separated with ‘;’ not ‘,’ and there should not be a terminating ‘;’