From Dev.to
'.map is not a function' — You're Not Holding an Array
The error isn't about map() at all. It means the value before the dot isn't an array: usually an object, a Set, or an unparsed string. Here's the fix. Adapted from the JavaScript Essentials Companion...
