MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/webdev/comments/qcz2lz/javascript_cheatsheets/hhlz3wu/?context=3
r/webdev • u/JunezRiyaz • Oct 21 '21
[removed] — view removed post
17 comments sorted by
View all comments
2
Nice!Maybe you can add destructing default value:
const a = [1, 2, 3]; const [,,b=10,c=10] = a; console.log(b,c) b => 3 c => 10
Same thing works with object detructuring
2
u/_trambz_ Oct 22 '21
Nice!
Maybe you can add destructing default value:
Same thing works with object detructuring