- 4

Practice

var countOfRooms = 15; // Your code here for (i =0; i<=15; i++){ if (i ==13){ break; } console.log (i + "<br/>"); }

21st Sep 2022, 12:54 AM
Emmanuel Pena
8 Answers
+ 2
Not break, but continue break --->>> continue
21st Sep 2022, 5:38 AM
Yaroslav Vernigora
Yaroslav Vernigora - avatar
+ 1
lol have fun with that practice then
21st Sep 2022, 1:25 AM
Slick
Slick - avatar
0
The problem is telling me output the console . I think i did . Had it as document.write before
21st Sep 2022, 12:57 AM
Emmanuel Pena
21st Sep 2022, 1:21 AM
Slick
Slick - avatar
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); }
21st Sep 2022, 11:48 AM
Emmanuel Pena
0
var countOfRooms = 15; // Your code here For(i =1 ; i<=countOfRooms+1; i++); { If (i==13){ Continue; Console.log (i); }
21st Sep 2022, 2:18 PM
Emmanuel Pena
0
Got it
21st Sep 2022, 2:18 PM
Emmanuel Pena
- 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.
21st Sep 2022, 12:56 AM
Emmanuel Pena