Hot tips are spicy lil' nuggets related to web development and tooling that I share on my twitter account. I've logged them here to make them easier to find.
Page 17 of 45
🔥 Format large numbers in your JavaScript with numeric separators.
const milly = 1_000_000;
This doesn't affect how the number works or is displayed - just helpful for reading large values quickly.
Running a Node / npm app in Deno - does it work?
🔥 Why do you sometimes see !!double bang in front of variables in JavaScript?
🔥 Did you know you can use type=“module” in a script tag block? Import external dependencies and use top level await without any tooling!
type=“module”
🔥 Use CSS :has() to select items based on what children they have.
:has()
This :has() never been possible in CSS before this and is pretty exciting.
I made a browser extension to detect who has paid $8 for their blue checkmark
🔥 JS Fundamentals: what is truthy and falsy?
🔥 Use CSS :where() to select multiple children inside a parent selector.
:where()
Super handy for H1 → H6 and selecting all inputs inside a form.
🔥 Since Arrays are Objects in JavaScript, you can use object destructuring on an array to get values like first, middle and last.
first
middle
last
🔥 Ever try sort a list of strings, but get tripped up by capitals and accented characters?
Use JavaScript’s Collator API!