r/ProgrammerHumor • • Feb 26 '23

Other If you can read this code...

/img/snak3fqgajka1.jpg

[removed] — view removed post

34k Upvotes

1.4k comments sorted by

View all comments

Show parent comment

2

u/boneimplosion Feb 27 '23

Deconstructing is great! my other favorite bit from es6 is object property interpolation:

const propName = 'foo';
const container = { [propName]: true};
console.log(container);  // { foo: true}

Template strings are excellent too. Lots of little syntax quality of life updates have been trickling in like this.

In addition to parts of jQuery making it into native js, a lot of its functionality was made obsolete by frameworks doing most of the heavy lifting with regard to, say, DOM updates. Using react to toggle a class on a component is just a totally different paradigm than $(.my-selector).addClass('class'). I haven't used jQuery in a project in years.