https://alpha.editor.p5js.org/willdray/sketches/BkJr5n_0z

Does anyone see an error in my API-retrieval code (p5.js)? Cryptic error message “{}”.

https://alpha.editor.p5js.org/willdray/sketches/BkJr5n_0z


    let p = scoringPlay[i].awayScore;
    let p2 = scoringPlay[i].homeScore;

i is not defined until inside the loop.

Ok. ThanksI I’ll modify the code.

1 Like