can u make a program that will ask for 12 numbers and display an option.It will display the entered number from high to low or low to high based on option.
Click the button to sort the array.
1-9 sort9-1 sortfunctionmyFunction()
{
var points= [40,100,1,5,25,10];
points.sort(function(a,b){returna-b});
varx=document.getElementById("Sorts");
x.innerHTML=points;
}
functionmyFunction2()
{
var points= [40,100,1,5,25,10];
points.sort(function(a,b){returnb-a});
var x=document.getElementById("Sorts");
x.innerHTML=points;
}
Need a fast expert's response?
Submit order
and get a quick answer at the best price
for any assignment or question with DETAILED EXPLANATIONS!