Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if(beers < 1)
- return null;
- console.log('[js] bottles (' + beers +')');
- let res = "";
- for(var i = beers; i > 1; i--) {
- res = res.concat(`${i} bottles of beer on the wall, ${i}\
- bottles of beer.<br/>Take one down and pass it around, ${i}\
- bottles of beer on the wall.<br/><br/>`);
- }
- res = res.concat(`1 bottle of beer on the wall, 1\
- bottle of beer.<br/>Take one down and pass it around, 1\
- bottle of beer on the wall.<br/><br/>\
- No more bottles of beer on the wall, no more bottles of beer.<br/>\
- Go to the store and buy some more, ${beers} \
- bottles of beer on the wall.`);
- return res;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement