In the latest Web Designer magazine, come check out the best in the latest version of JavaScript - ES2017 (or ES8, if you want to be all informal about it).
While not as big a deal as ES2015 was, the latest iteration brings with it the long-awaited async/await feature set. In short, these make asyncronous code look syncronous to avoid stacks and stacks of callbacks or promise chains. Be careful, though, as it’s easy to start writing syncronous code again and slow everything down. Boo.
There’s also a bunch of other object methods that make dealing with large datasets a little easier. Object.values
for example will just return the… values in an object, obviously. But for iteration across a bunch of values inside of it, it’s a real winner.
There’s also some concept called “Shared Memory and Atomics” buried in there, which isn’t designed to be used by us mere mortals on a day-to-day basis. This is a good thing, as trying to describe it nearly melted my little brain. In short, it makes sharing data across worker threads a bit quicker by going a bit too close to the metal for my liking.
All of this is described lovingly through making a dog breed information website. Surely anything that uses a Dog API is worth putting time and effort into, right?
It also guest stars Buddy, the little Boston Terrier that claimed the hearts of my family once we all flew the nest. He is very adorable.
The dog on the cover is this little terror, Buddy. pic.twitter.com/tNE5jFJCRt
— Matt C (@stupler) 20 September 2017