<script> function sort(arr) { return arr.sort(function(a, b) { return a > b; }) }; console.log(sort([1, 3, 8, 9, 6, 2, 4])); </script>