Creating and filling global array

I’m daft and need help :slight_smile: I can’t figure out why this doesn’t work (script widget). It seems the .push() doesn’t do anything inside the for-loop:

JS{{
global.someArray = [“black”];

for (i = 0; i < 10; i++) {
global.someArray.push(“black”);
}

}}

Cheers
Søren

Hi, there are 2 errors:

  • smart quotes characters are not supported
  • you need to declare variable i: for (var i=0; ...

Heh, both errors only exists in my example above :laughing: I redid the script wdiget and everything was fine, so my guess is there was a typo somwhere :slight_smile:

Cheers