Closed dan-ator closed 9 years ago
In an if/else statement, how do I tell it to just do nothing in the else part? In other words,
function nextButton() { if (currentNumber < (cardData.length-1)) { currentNumber++; drawCard(); } else { alert("You're Done!") } }
instead of using the alert to say youre done, I want it just not to do anything.
Three backtics for multiple lines of code!
Just omit the else bit:
else
function nextButton() { if (currentNumber < (cardData.length-1)) { currentNumber++; drawCard(); } }
In an if/else statement, how do I tell it to just do nothing in the else part? In other words,
instead of using the alert to say youre done, I want it just not to do anything.