标签: javascript arrays
我想获得数组中的最高值和最低值,但这不起作用。
var arr1 = new array(); <?php $temp = 0; foreach ($y->result() as $get) { ?> arr1[<?php echo $temp;?>] = "<?php echo $get->hits;?>"; <?php $temp++; } ?> var maxim = arr1.max(); var minim = arr1.max();