1var Arr = [1, 7, 2, 8, 3, 4, 5, 0, 9];
2
3for (var i = 1; i < Arr.length; i++)
4 for (var j = 0; j < i; j++)
5 if (Arr[i] < Arr[j]) {
6 var x = Arr[i];
7 Arr[i] = Arr[j];
8 Arr[j] = x;
9 }
10
11console.log(Arr);