Hi there, first time posting here so I hope it's in the right area.
Create a Date object for the end of the month in which you're doing this exercise.
In a single statement display an alert that gives the number of days for that date since the reference date of January 1, 1970.
Round it down to an integer.
Click the Run It button to run your code live.
Why does .getTime() go in with the variable, and not in the alert?Code:var ex = new Date("March 31, 2014").getTime(); alert(Math.floor(ex / (1000 * 60 * 60 * 24)));
I'm aware of what it does, but not why it is placed up there. Help immensely appreciated