I got the sort and printout part of the program working, but i need to generate 100 random numbers between 1 and 100 and sort them. But I am not sure what is missing from the program to make it work correctly. I created an array to store the numbers in it and I made sure to specify the number of numbers I wanted and that it should be from 1-100.
<script>
var arr = [];
while(arr.length < 100){
var r = Math.floor(Math.random() * 100) + 1;
numbers.sort();
numbers.sort(function(a, b){
return a - b;
});
document.write(numbers);
</script>