This file contains hidden or 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
# year and month are variables | |
year = 2015 | |
month = 7 # August (0 indexed) | |
startDate = moment([year, month]) | |
# Get the first and last day of the month | |
firstDay = moment(startDate).startOf('month') | |
endDay = moment(startDate).endOf('month') | |
# Create a range for the month we can iterate through |
This file contains hidden or 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
'use strict'; | |
/*****************NATIVE forEACH*********************/ | |
Array.prototype.myEach = function(callback) { | |
for (var i = 0; i < this.length; i++) | |
callback(this[i], i, this); | |
}; | |
//tests |