- 4
Practice
var countOfRooms = 15; // Your code here for (i =0; i<=15; i++){ if (i ==13){ break; } console.log (i + "<br/>"); }
8 Answers
+ 2
Not break, but continue
break --->>> continue
+ 1
lol have fun with that practice then
0
The problem is telling me output the console . I think i did . Had it as document.write before
0
Try something like this:
https://code.sololearn.com/WrHwJ5cRpMWM/?ref=app
0
Its a practice exercise . Used continue but still.
var countOfRooms = 15;
// Your code here
for (i =1; i<=15; i++){
if (i ==13){
continue;
}
console.log (i);
}
0
var countOfRooms = 15;
// Your code here
For(i =1 ; i<=countOfRooms+1; i++); {
If (i==13){
Continue;
Console.log (i);
}
0
Got it
- 1
Many tall buildings, including hotels, skip the number 13 when numbering floors -- often going from floor 12 to floor 14. It is thought that the number 13 is unlucky.
Write a program that will number 15 rooms starting from 1, skipping the number 13. Output to the console each room number in separate line.