📅  最后修改于: 2022-03-11 14:55:18.829000             🧑  作者: Mango
var array = [3 , 6, 2, 56, 32, 5, 89, 32];
var largest= 0;
for (i=0; i<=largest;i++){
if (array[i]>largest) {
var largest=array[i];
}
}
console.log(largest);