var x = 99;
while (true)
{
function lyrics(person)
{
return x + " " + "lines of code in the file " + x + " " + person + (x-1) + " lines of code" + "!";
}
console.log(lyrics("John strikes one out, clears it all out ;"));
x -= 1;
if (x == 0)
{
break;
}
}
I need help with my coding logic.
Also, please advise me if there are any mistakes in my function.
I keep getting a NaN
error when running it with (x-1)
. I want it to display 99 lines of code in the file, 99 lines of code John strikes one out, clears it all out, 98 lines of code in the file.
Please bear with me as I am new to this.