Going From ES5 to ES6 (Solution to Code Challenge #13)
Last week on the code challenge #13 we looked at converting sample code in ES5 to even simpler and more readable code in ES6. Yet to take the challenge? You can check it out here.
In this post, we shall solve the challenge.
Awesome entries for the challenge can be found in the comment section of the post, on Twitter using the hashtag #ScotchChallenge and on the Spectrum forum.
The Challenge
No doubt that the ES6 version of JavaScript came with tons of amazing and useful features making web development with JavaScript even simpler and less error-prone.
In this challenge, we are presented with a set of 5 different code pieces requiring a re-write using a key ES6 feature. We would go over these individual challenges and the solution for each shortly. However, we were provided with boilerplat...