Write a script that prints the lyrics to "99 Bottles of Coke on the Wall" in the terminal. If you're unfamiliar with the song, you can find the lyrics below.
Make sure your program can handle both singular and plural cases (i.e. both "100 bottles of coke" and "1 bottle of coke").
Lyrics of the song 99 Bottles of coke*/
var i=99;
var l=99;
var n='no more'
while(i>1)
{
console.log(i+' bottles of beer on the wall, '+i+' bottles of beer.\n'+
'Take one down and pass it around, '+i+' bottles of beer on the wall.');
i--;
}
console.log(i+' bottles of beer on the wall, '+i+' bottles of beer.\n'+
'Take one down and pass it around, '+n+' bottles of beer on the wall.');
console.log(n+' bottles of beer on the wall, '+n+' bottles of beer.\n'+
'Go to the store and buy some more, '+l+' bottles of beer on the wall.');
`
` /*Assignment 1: 99 Bottles of Coke
Write a script that prints the lyrics to "99 Bottles of Coke on the Wall" in the terminal. If you're unfamiliar with the song, you can find the lyrics below. Make sure your program can handle both singular and plural cases (i.e. both "100 bottles of coke" and "1 bottle of coke"). Lyrics of the song 99 Bottles of coke*/
var i=99; var l=99; var n='no more' while(i>1) { console.log(i+' bottles of beer on the wall, '+i+' bottles of beer.\n'+ 'Take one down and pass it around, '+i+' bottles of beer on the wall.'); i--; }
console.log(i+' bottles of beer on the wall, '+i+' bottles of beer.\n'+ 'Take one down and pass it around, '+n+' bottles of beer on the wall.'); console.log(n+' bottles of beer on the wall, '+n+' bottles of beer.\n'+ 'Go to the store and buy some more, '+l+' bottles of beer on the wall.'); `