0

How to append values to an array
How do you append a value to an array? The closest I get is:
var x := ["Hi", "there"];
var y := ["dude"];
x+y
but, while it dosen't have an error in it's code, it does not return an array
Like Follow
4replies
-
let myArray1 := [1, 2, 3];
let myArray2 := [4, 5, 6];
let myArray3 := myArray1 + myArray2;
let myArray4 := [item(myArray3, 0), item(myArray3, 1), item(myArray3, 2), item(myArray3, 3), item(myArray3, 4), item(myArray3, 5)];
alert(text(last(myArray4)))All the Ninox functions worked doing this and myArray4 could probably be initialized using a loop. Still, kind of cumbersome. I tried using concat() on myArray3 and all I got back was a single string of 123456.
-
maybe this helps?: https://docs.ninox.com/en/script/functions/array