Randomizing an Array with Sort
How to randomize an array? Use the sort
command, with the option:
|
|
For example:
|
|
How to randomize an array? Use the sort
command, with the option:
|
|
For example:
|
|
Using the Node.js repository as an example:
|
|
If we would like to list all tags with v0.12
versions, we could do:
|
|
However, v0.12.2
should come after v0.12.1
.
To fix it, we use the sort
command with option:
|
|
Thus:
|
|