Error AtlasError Documentation and Resolution

JavaScript value is not iterable

TypeError: x is not iterable

JavaScript expected an iterable for spread syntax, for...of, destructuring, or APIs like Promise.all, but received a non-iterable value.

TypeError: x is not iterableruntime
TypeError: x is not iterable
  • Code passed a plain object where an iterable was expected.
  • A value is null, undefined, or not implementing Symbol.iterator.
  • A generator function itself was used instead of its returned iterator.
  1. Pass a real iterable such as an array, string, or Map.
  2. Convert objects with Object.keys or Object.entries before iterating.
  3. Check whether you need to call a generator function before iterating over it.
MDN: TypeError: x is not iterable
JavaScript x is not iterable: causes and fixes | Error Atlas