Created
November 18, 2013 22:25
-
-
Save selahlynch/7536472 to your computer and use it in GitHub Desktop.
immediate function example
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
var days = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'], | |
today = new Date(), | |
msg = 'Today is ' + days[today.getDay()] + ', ' + today.getDate(); | |
alert(msg); | |
////////////////////////////////////////////////////////////////// | |
(function () { | |
var days = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'], | |
today = new Date(), | |
msg = 'Today is ' + days[today.getDay()] + ', ' + today.getDate(); | |
alert(msg); | |
}()); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment