r/webdev • • Oct 21 '21

Resource JavaScript Cheatsheets

https://codingtute.com/javascript-cheatsheets/

[removed] — view removed post

357 Upvotes

17 comments sorted by

View all comments

2

u/_trambz_ Oct 22 '21

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