Created
December 3, 2015 14:57
-
-
Save jonathanpike/880ee251720c7e4662ae to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
window.onLoad = function() { | |
function dayOfWeek() { | |
var date = new Date(); | |
var days = ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"]; | |
return days[date.getDay()]; | |
} | |
document.getElementById("day").innerHTML = dayOfWeek(); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment