🔥 Nice little trick adapted from @Fotiman after the most recent @syntaxfm
Get an array of all month/day names using .toLocaleDateString()
🔥 Intersection Observer is handy for when you need to disable a UI until something has been shown on screen. In this case we can check if the last element of a terms and conditions has been totally shown before enabling the accept button. code in followup tweet 👇🏻
Next →🔥 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