Numeric array variable initialization
Hello there.
I'm stuck with a somehow simple problem. I can't create a variable type array and initialize it unless I enter a number. Take a look at this code:
It returns nothing. But add a 0 to the array definition, like this:
And it returns a list of numbers:
So, how can I initialize a numeric array WITHOUT inserting any number in the array definition?
NOTE: For initializing an string array, there is already an easy method; you just type an empty string:
9 replies
-
Ninox needs to know the exact type of variable to set it. You cannot create a variable with an unknown type as JavaScript.
About your code, you can simplify it, then you don't have to initialize with [0] : -
After Günther posted this solution I made a test database with some additional array manipulations. I can't test it against your code right now, but it might help.
Content aside
-
1
Likes
- 2 yrs agoTue, November 8, 2022 at 6:07 AM UTCLast active
- 9Replies
- 541Views
-
3
Following