Skip to content

Instantly share code, notes, and snippets.

@pgengler
Last active April 1, 2021 13:23
Show Gist options
  • Save pgengler/03b6876b8fdf63ee3ba4e34948705a32 to your computer and use it in GitHub Desktop.
Save pgengler/03b6876b8fdf63ee3ba4e34948705a32 to your computer and use it in GitHub Desktop.
Incorrect error message from Chrome on invalid destructuring
let a = { foo: 'bar' };
let [b] = a;
// => Uncaught TypeError: a is not iterable
let c = { foo: { bar: 'baz' } };
let [d] = c.foo;
// => Uncaught TypeError: undefined is not a function
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment