#Is null an iterable??
6 messages · Page 1 of 1 (latest)
An object is not iterable and yet you can spread it. The spread operator acts differently if in an object literal
({...{id: 42}}) works just as expected
Type of null is object but it's a historical bug
Anyway js treats null as a non existent object so it returns {}

> [...null]
Uncaught TypeError: null is not iterable