Jun 3, 2025
This type of destructuring is for ANY iterable, not only arrays. Strings will also work, for example:
let [first, second, third] = "cat"
This type of destructuring is for ANY iterable, not only arrays. Strings will also work, for example:
let [first, second, third] = "cat"
Hi Jon, thank you for the correction. You're totally right. I've updated the article to reflect that. Really appreciate you pointing it out!
--