The :scope CSS pseudo-class represents elements that are a reference point for selectors to match against.
A situation where the :scope pseudo-class prove to be useful is when you need to get direct descendant of an already retrieved Element
element.querySelectorAll(":scope > .child");
https://developer.mozilla.org/en-US/docs/Web/CSS/:scope
#CSS #JavaScript #TIL
Random array using the modern Fisher–Yates shuffle algorithm in JavaScript: https://www.damianwajer.com/blog/random-array-the-modern-fisher-yates-shuffle-algorithm/
Random array using the modern Fisher–Yates shuffle algorithm in JavaScript - Damian Wajer
How to make sure the randomness is really random. It might be tempting to use just Math.random() but it will not produce fair results. The Fisher–Yates shuffle algorithm…Damian Wajer