0
Having issue with the right syntax for line break in JavaScript code.How to get the line break?
var countOfRooms = 15; // Your code here for(i=1;i<=countOfRooms;i++){ if(i==13){ continue; } console.log(i+"\n"); }
5 Respuestas
+ 3
Sohel Kumar Samantaray
console.log automatically adds newline. why would you have to add the extra '\n'?
Maybe I'm not understanding what you want.
Can you give an example of the expected result?
+ 1
Bob_Li Expected output:
1
2
3
4
5
6
7
8
9
10
11
12
14
15
+ 1
var countOfRooms = 15;
// Your code here
for(i=1;i<=countOfRooms;i++){
if(i==13){
continue;
}
console.log(i);
}
0
Try to use ' ' not " "
0
Bob_Li
My output:
1234567891011121414