I'm learning JavaScript with Judati.
It's a question written in a while sentence.
I need to print out the following, and the code I wrote is
var num = 99;
while (num>=1) {
console.log(num +" bottles of juice on the wall! " + num +" bottles of juice! Take one down, pass it around... "+(num -1) + " bottles of juice on the wall!");
}
num = num-1;
}
var num = 99;
while (num>=1) {
console.log(num +" bottles of juice on the wall! " + num +" bottles of juice! Take one down, pass it around... "+(num -1) + " bottles of juice on the wall!");
} // <-- Clear here: SyntaxError: expected expression, got '}'
num = num-1;
}
© 2024 OneMinuteCode. All rights reserved.