I'm sure this has something to do with that it's nearly 5 AM...and that I'm missing something obvious.
Here is my code:
var dayInMonth = 2,
lastDayNum = 30;
console.log(dayInMonth, (dayInMonth > lastDayNum)); // displays "2 false"
for(dayInMonth; dayInMonth > lastDayNum; dayInMonth++){
console.log("here!") // not displaying anything
}
What is stopping the for loop from executing theconsole.log() statement?
dayInMonth > lastDayNumisfalse, i.e 2<30.... Take a nap and try again