example of while loop in javascript with array length

Solutions on MaxInterview for example of while loop in javascript with array length by the best coders in the world

showing results for - "example of while loop in javascript with array length"
Oscar
17 Jan 2019
1var soccerTeams = ['Barca','Madrid','Gunners','City','PSG']
2var x=0;
3
4while( x <= soccerTeams.length) {
5  console.log(soccerTeams[x])
6  x++;
7}
8
9======== output ===========
10Barca
11Madrid
12Gunners
13City
14PSG
15undefined
165