how to make an ascending order of numbers with array? example: 25-42-10-8-17
Develop games in your browser. Powerful, performant & highly capable.
Sorts the order of elements on an axis in ascending order. Note that in multidimensional arrays this sorts based on the first element on the axis. For example sorting the X axis in a 2D array will sort the order of the columns based on the elements at Y co-ordinate 0, while preserving the contents of each column.
in my case, I'm trying to create random numbers that don't repeat, I can do it. but I would like it to follow an ascending order. I try to do it, but it doesn't work. 8,10,17,25,42, I wanted it in order. I've seen many examples, but it still doesn't work. thanks for trying to help me.👍🙃