Header Ad

Monday, March 8, 2010

How to find in between value from an array in javascript

Take the following code is an simple example for finding bigger value in an array


var foo = new Array("222","323","314","431","422");
var biggest = 10;
for (x=0;xif (foo[x] > biggest) {
biggest = parseint(foo[x]); //right here
}
}
document.write(biggest);

No comments: