I am very new to coding and it's been fun so far. But I've been trying to work a function and for loop together and have it print out with console.log. Is anything at all correct? Or am I just completely lost?
What I want it to do is have bottlesLeft have a value of 99. Declare a function named 'bottleStockReporter'. Inside the function use console.log() to print out how many bottles of root beer are on the wall. "99 bottles of root beer on the wall. 99 bottles of root beer." Use a while loop to call your new function for the value of 'bottlesLeft' and decrease 'bottlesLeft' by 1 each time.
This is what I have so far:
var bottleStockReporter = function(number)
{
var bottlesLeft = 99;
console.log(bottlesLeft) + "bottles of root beer on the wall." + (bottlesLeft) + "bottles of root beer on the wall.";
for(var bottlesLeft = 99; bottleLeft>0; bottlesLeft = bottlesLeft --);
};
bottleStockReporter(99);
my output prints out the number 99
whileloop then you shouldn't be using aforloop.