Awesome ES6 Features I love and you should not miss

It’s all those tiny little details that makes you happy while writing javaScript code after ES6 came for a rescue. Following list contains the features from ES6 that I use mostly and has made my life easier when writing my JavaScript code. Template Literals Arrow functions Spread operators Classes Modules Default params Promises Object.entries() Object[key]

Javascript reduce function on array of objects

Array.reduce() function in javascript is one of the most interesting functions, but it may be tricky if you haven’t worked with it on array of objects. Let us first look at the following code (array of plain integers), the code basically sums up all the elements in the array: [js] [1, 2, 3].reduce((accumulator, element) => […]