πŸ”₯ If you are trying to add/remove multiple classes from an element, an array spread is the perfect use case here since classList.remove() requires multiple arguments.

Instead of it passing in 1 array arg, it passes each item of the array as a separate argument

← Prev

πŸ”₯ Nice little trick adapted from @Fotiman after the most recent @syntaxfm

Get an array of all month/day names using .toLocaleDateString()

Next β†’

πŸ”₯ If the Fetch API seems a little cumbersome and you don’t want to reach for Axios, you can always make a handy little function that applies your defaults (assumes JSON) and can be overwritten if needed