为什么if语句执行完 else if语句就不往下执行了,不应该啊
var arr=[1,2,3,4,5];
var arrOut = {
one:'',
two:'',
three:'ph',
four:'',
five:'',
}
var arrNumber = 0;
var arrLength = arr.length;
for(i=0;i<arrLength;i++){
arrNumber = i + 1;
console.log(arrNumber);
if(arrNumber = 1){
arrOut.one = "第1个元素的值是:"+ arrNumber
console.log("已执行1");
}else if(arrNumber = 2){
arrOut.two = "第2个元素的值是:"+ arrNumber
console.log("已执行2");
}else if(arrNumber = 3){
arrOut.three = "第3个元素的值是:"+ arrNumber
console.log("已执行3");
}else if(arrNumber = 4){
arrOut.four = "第4个元素的值是:"+ arrNumber
console.log("已执行4");
}else{
arrOut.five = "第4个元素的值是:"+ arrNumber
console.log("已执行5");
}
}