What does curly brackets in the `var { … } = …` statements do?

What you’re looking at is a destructuring assignment. It’s a form of pattern matching like in Haskell. Using destructuring assignment you can extract values from objects and arrays and assign them to newly declared variables using the object and array literal syntax. This makes code much more succinct. For example: var ascii = { a: … Read more