Home Syntax - what does square brackets around a variable declaration mean
Reply: 0

Syntax - what does square brackets around a variable declaration mean

user661
1#
user661 Published in July 16, 2018, 3:06 am

This question already has an answer here:

  • Multiple assignment in javascript? What does [a,b,c] = [1, 2, 3]; mean? 4 answers

Take the following line of code

const [component] = router.getMatchedComponents({ ...to })

Could anyone advise what the square brackets around component means here? I have tried to google this but struggling to find an answer

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.324473 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO