Last active
April 1, 2021 13:23
-
-
Save pgengler/03b6876b8fdf63ee3ba4e34948705a32 to your computer and use it in GitHub Desktop.
Incorrect error message from Chrome on invalid destructuring
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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