jskatas.org Continuously Learn JavaScript. Your Way.

Destructuring: string

Destructuring can also be done on strings.

Donate to NGO Julenka. Support Ukranians in need. Julenka is an NGO which my brother founded in 2011 to support Ukranian families and kids in need.

Destructuring also works on strings

  • destructure every character, just as if the string was an array
  • missing characters are undefined
  • unicode character work too