Possible Duplicate:
JavaScript: min & max Array values?
Generate max 'N' values from javascript array
var arr = new Array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10)
How to execute 5 max values from this array?
result must be like
10, 9, 8, 7, 6
Possible Duplicate:
JavaScript: min & max Array values?
Generate max 'N' values from javascript array
var arr = new Array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10)
How to execute 5 max values from this array?
result must be like
10, 9, 8, 7, 6
Check out the Arrays Java API doc. It'll give you some practice in reading up on documentation as well as give you methods to use to solve the homework problem ;)
you can try this 1. first you arrange Array in ascending order. 2. get it's Length. 3. get last 5 Digits whose u have required.
i thinks this is helpful to you. ..! cheers