while loop php
<?php
$a = 0;
while($a<=5){
echo $a."<br>";
$a++;
}
?>
while loop php
<?php
$a = 0;
while($a<=5){
echo $a."<br>";
$a++;
}
?>
javascript while
var i=0;
while (i < 10) {
console.log(i);
i++;
}
//Alternatively, You could break out of a loop like so:
var i=0;
while(true){
i++;
if(i===3){
break;
}
}
example of while loop in javascript with array length
var soccerTeams = ['Barca','Madrid','Gunners','City','PSG']
var x=0;
while( x <= soccerTeams.length) {
console.log(soccerTeams[x])
x++;
}
======== output ===========
Barca
Madrid
Gunners
City
PSG
undefined
5
do while loop in javascript
do {
text += "The number is " + i;
i++;
}
while (i < 10);
while loop js
let count = 0;
let max = 10;
while (count < max) {
console.log(count)
count = count + 1
}
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us