Warmup - Snoozed

Warmup - Snoozed

We want to program our alarm clock according to our schedule. In this exercise, we will create a function that has a parameter for weekdays and another for holidays. Both arguments, to be passed in, will be booleans.

This function should know when we should sleep in, returning true.

Example:

//sleepIn(weekday, holiday)
sleepIn(false, false)
//returns: true

sleepIn(true, false)
//returns: false

sleepIn(false, true)
//returns: true

Extra Credit:
Pass in a date and compare it to the following holidays object to determine if the alarm should snooze.

// An object containing what days should be holidays for this exercise.
var holidays = {1: [1], 2: [14], 3: [17], 4: [27], 5: [10], 6: [21], 7: [4], 8: [3], 9: [7], 10: [12, 31], 11: [26], 12: [25]};