I'm trying to get into generative Art and using for the first time p5.js for that. Now, I've tried to follow a guide to understand the process. I did exactly how the guide told me to do so, now I'm trying to figure out why I do have an error. The error is "ReferenceError: Can't find variable: strokeCap" I'm not really sure, why it does say can't find variable. Please help me out! I'd be very thankful.
function setup() {
createCanvas(400, 400);
noLoop()
colorMode(HSL)
}
function draw() {
background("antiquewhite");
}
let loops = 5;
while (loops--) {
strokeCap(SQUARE);
strokeWeight(random(50));
stroke(random(0, 50), random(0, 100), random(0, 100));
line(random(50,350),random(50,350),random(50,350),random(50,350));
}
function mousePressed(){
saveCanvas("outputSave","png")
}