66 840
Assignments Done
99,1%
Successfully Done
In October 2018

Answer to Question #15262 in AJAX | JavaScript | HTML | PHP for Cherry jurada

Question #15262
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.
Expert's answer
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!

Comments

No comments. Be first!

Leave a comment

Ask Your question

Submit
Privacy policy Terms and Conditions