19 JavaScript nuggets!
Published on 27 April 2020 • 1 min

Cette page est également disponible en français.

Starting May 4th, we’ll launch a series called “19 nuggets of vanilla JS,” with a daily article (not too long, great for nibbling) on a facet of pure JavaScript language; or a protip, best practice, poorly known ability, mythbusting, demystifying, etc. 19 reasons to come back!

What’s in there?

Woah, lots of stuff. Light stuff, heavy stuff, thought-provoking stuff…

(Edit end of series: the entire list is now available here for easier consumption.)

  1. Efficiently deduplicating an array
  2. Efficiently extracting a substring
  3. Properly formatting a number
  4. Array#splice
  5. Strings and Unicode
  6. Short-circuiting nested loops
  7. Inverting two values with destructuring
  8. Easily stripping “blank values” from an array
  9. Long live numeric separators!
  10. Properly sorting texts
  11. Extracting emojis from a text
  12. Properly defining optional named parameters
  13. const is the new var
  14. Using named captures
  15. Object spread vs. Object.assign
  16. Converting an object to Map and vice-versa
  17. The for-of loop: should there remain only one…
  18. Simulating an abstract class with new.target
  19. Negative array indices thanks to proxies

So keep a sharp eye out for daily releases!