Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

while loop in javascript

const numbers = [3, 4, 8, 9, 2];
let number = 0;
while (number < numbers.length) {
    const getNumbers = numbers[number];
    console.log(getNumbers)
    number++
}
//Expected output:3 4 8 9 2
Source by developer.mozilla.org #
 
PREVIOUS NEXT
Tagged: #loop #javascript
ADD COMMENT
Topic
Name
5+9 =