ES6 - A beginners guide - Welcome

Stefan Wright - Aug 31 '21 - - Dev Community

What is ES6? How can I use it? Follow this series to learn more.

Welcome

For my employment we have been asked to learn/revisit ES6 as we begin to transfer the JS in our codebase into ES6, if you're here then its likely you already know what ES6 is, if you don't...let me summarise below.

What is ES6?

Well, ES6 stands for ECMAScript 6 which has been around now since June 2015, it is also known as ECMAScript 2015. ECMAScript itself has been around since June 1997 with an annual review of the standards in place. ECMAScript was invented to standardize JavaScript meaning that browsers could be built around that standard ensuring support of the different levels. ES6 introduces us with some new tools which I will go into in more detail in this series, for example:

  • Classes
  • Arrow Functions
  • New Variable scoping (var, let, const)
  • Template Literals
  • Object and Array Destructuring
  • Default Parameters
  • Rest and Spread Operators

Many ES6 tutorials will also cover various Array "helpers". I'll be looking to touch on these too as they are frequently used, but I have found often referred back to as a reminder of how to write it "properly". So those are:

  • forEach
  • map
  • filter
  • find
  • every/some
  • and reduce (save the hardest til last!)

In this series, for each of the above I will try to include a variety of examples and real-world use cases

. . . . . . . . . . . . .