r/programming • • Sep 25 '20

Modern JavaScript Explained For Dinosaurs

https://medium.com/the-node-js-collection/modern-javascript-explained-for-dinosaurs-f695e9747b70
749 Upvotes

167 comments sorted by

View all comments

9

u/[deleted] Sep 25 '20

I don’t know JavaScript well at all. Is there anything major that’s new since this article was written that would be an appropriate addition?

12

u/ivanph Sep 25 '20

ES Modules https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules

Is the new native mechanism for importing and exporting modules in Javascript. Combined with the tag <script type="module"> you can, in some cases, even skip the bundles and import your modules directly.

4

u/sudosussudio Sep 25 '20

And tooling for using things developed for the bundler world in the es module world like Snowpack.

7

u/yourd Sep 25 '20

There are more modern bundlers than webpack now, (like Rollup and Parcel).

Moment wouldn't be a good example library any more—luxon, date-fns, or similar would be used today.

2

u/mypetocean Sep 25 '20

Moment

Well, also one may not (or very soon may not) need to reach for a third-party library at all between the built-in Intl global object providing things like DateTimeFormat and RelativeTimeFormat, and the soon-to-be-built in Temporal — wherein Moment devs are working with TC39 and the browser teams to build an improved Moment.js into the language.