MV For every variable array value, execute a command

Hello I have variable01 as an array

$gameVariables.value(1) = [1, 2, 3, 4, 5, 7 ,8]

I want to execute add Actors to party based on the array but this doesn't seem to work out


Code:
    const values = $gameVariables.value(1);
    values.forEach((i) => {
      $gameParty.addActor(i);
    console.log("(i) added to party successfully");
    };
You forgot to close the forEach:
JavaScript:
    const values = $gameVariables.value(1);
    values.forEach((i) => {
      $gameParty.addActor(i);
    console.log("(i) added to party successfully");
    });
Thanks, it works now; I'm dumb. Thank you!

Original thread: https://forums.rpgmakerweb.com/threads/for-every-variable-array-value-execute-a-command.159830/