🔢 Quick tip: if you're sorting an array in JS and keep forgetting how to write the compare functions (like I do), here's a mnemonic device:
(a, z) => a - z // ascending, like "a to z"
(a, z) => z - a // descending, like "z to a"
Hope this helps someone!
Accessibility tip: Use aria-current to style active links.
Benefits:
1. Screen reader users will get a friendly notification that the link is active.
2. Clarifies and simplifies testing (Can assert the aria-current attribute exists on active links)
Reaching out to my network @Saman27858105 is a student at @CoderAcademy_au, he’s also a refugee currently in dentition. I’m amazed at his tenacity, work ethic, and ability to learn in such difficult circumstances. He’s looking for a connections and a mentor, could anyone help?