Please I am trying to display the firsts columns of a multidimensional array in JS but when the current item is undefined, the loop ends even when the following items follow the condition of the loop. this is my code.
for(var z = 0; z < 4; z++) {
if(typeof(liste_des_points[z][0])!='undefined')
alert(liste_des_points[z][0]);
}
liste_des_points is actually an array built from the rows of a mysql table. N.B: I have tried to display these line independently and it works.
alert(liste_des_points[0][0]);//this line display 0
alert(liste_des_points[1][0]);//this line display 1
alert(liste_des_points[2][0]);/*display anything because the value is absent in the database*/
alert(liste_des_points[3][0]);//this line display 3
Thanks
3 < 3 === falseconsole.log(liste_des_points)to the question.