
They're just easier to find/read when going through a lot of code. IE11 is finally dead dead so everything supports it.Īrrow functions are great, but personally i'm using good old function() definitions. Your eyes will literally glance over a spread operator thinking it's just a variable definition and leave you wondering where the hell the loop is for the data you're seeing render. Use a for loop, it's just as fast if not faster.

Spread Operator is nice for small arrays, but dear god do not try to use that thing on a large data set. Some might say "oh those we bad devs" and to that i'll say "We are all bad devs because we don't know what we don't know and now you know better" New dev looks at their code and says "everything looks fine".until finally someone else looks at the whole thing and goes "You not use destructuring use Objects so you have "box.width" and "box.length" or standard variables like "box", "box_width" and "box-height" so when you add Bed later on there is no chance of conflict. Original dev looks at their lines and goes "everything looks fine". Now, Box was added to the code first so the dev just destructured it and used width and height as variables about 50 lines lower in the code, cool, no problem.Ī year later a support request came in, another dev had to add Bed to the code and they thought destructuring was great too, they put their code in between where Box is defined and above where the Box vars were used, suddenly Box's dimensions break and no one knows why. Let's say you have a "Box" and a "Bed", both have dimensions like "width" and "height" Here's why, and i've seen this in production code i had to debug and it took forever. Variables that are declared with “Let” must be declared before usage.Nice write up, I want to add some notes to it though. Variables that are defined with “Let” will have a “Block Level” scope. Variables that are declared with “Let” cannot be redeclared. The “Let” keyword is a useful addition to JavaScript. Ten ES6 Features Supported Natively By Modern Web Browsers Once you are acquainted with these features, you will feel the difference in the way you write your code. I will demonstrate some of the useful features that you should start utilizing in your projects and improve your experience in JavaScript.

Honestly, a lot has changed when JavaScript launched ECMAScript 2015 or simply ES6. Web developers who have just started learning JavaScript or have professional working experience can benefit from this article.
