It would be very usefull to be able to return multiple values in a function and adress them with indexes like parameters.
What do you think?
You could return a string with comma-separated numbers, or simply make the function set values in an array instead of returning a value (which doesn't work with recursive functions, but might work for you).
Look up TokenAt() I use that all the time.
TokenAt("1,2,3,4",2,",") = 3
the selected comma separated item in the list is 3.
Edit: Actually here is the manual entries:
tokenat(src, index, separator)
Return the Nth token from src, splitting the string by separator. For example, tokenat("apples|oranges|bananas", 1, "|") returns oranges.
Count how many tokens occur in src using separator. For example, tokencount("apples|oranges|bananas", "|") returns 3.
Develop games in your browser. Powerful, performant & highly capable.
Yes, the string will do the job.