Sort an integer array: Difference between revisions
jq
(jq) |
|||
Line 565:
#array // 20, 6, 5, 4, 3, 2, 1</lang>
=={{header|
jq's builtin <code>sort</code> filter sorts the elements of an array in ascending order:
<lang jq>[2,1,3] | sort # => [1,2,3]</lang>
=={{header|Julia}}==
Julia has both out-of-place (<code>sort</code>) and in-place (<code>sort!</code>) sorting functions in its standard-library:
|