<script>var temp = 0;var arr = [6, 7, 95, 3, 23, 1, -9, 9999, 767675];for (var i = 0; i < arr.length - 1; i++) {for (var j = 0; j < arr.length - i; j++) {if (arr[j] > arr[j + 1]) {temp = arr[j + 1];arr[j + 1] = arr[j];arr[j] = temp;}}}console.log(arr);</script>