I'm struggling with a function that is supposed to show the number of milliseconds elapsed since Midnight on January 1st, 1970. I've been trying to use setInterval to update the integer every second or millisecond, but it doesn't seem to be working properly.
var date = new Date() setInterval(function(){time.innerHTML = date.getTime()}, 1)
<span id="time"></span> milliseconds
I have a feeling that there's just a small mistake that I'm overlooking, but I'm having trouble pinpointing it.