Skip to content

Instantly share code, notes, and snippets.

Avatar

Cody Deadairx

  • Bluebeam
  • Dallas, Texas
View GitHub Profile
View to.js
var secondsPerMin = 60;
var minsPerHour = 60;
var hoursPerDay = 24;
var daysPerWeek = 7
var weeksPerYEar = 52;
var secondsPerDay = secondsPerMin * minsPerHour * hoursPerDay;
document.write("<p>There are " + secondsPerDay + " seconds in a day</p>");
var yearsAlive = 29
var secondsAlive = secondsPerDay * daysPerWeek * weeksPerYEar * yearsAlive;
document.write("<p>I have been alive for " + secondsAlive + " seconds.</p>");