As previously mentioned, there's a great set of new features in ES6. To provide a brief overview of a few of my favourites:
Otherwise known as 'fat arrows', the => symbol is a new syntax feature which allows for shorthand function definition. Some good examples include:
const firstNames = fullNames.filter(name => name.firstName);
The let keyword allows us to define variables we plan to change with lexical scoping in mind - that is, block-scoping (opposed to the traditional function-level scope we receive with var).
The const keyword allows us to define variables in our code that we expect not to change and thus, cannot be changed or mutated. They're immutable in this sense and provides some robust features to our code.
At a first glance, the Map type looks to be identical to traditional Objects; however, upon further inspection, a number of differences can be spotted.
Firstly, Maps are traditionally iterable - a for loop can iterate through a map. Secondly, you can retrieve the size of a Map easily in comparison to traditional objects. For dynamic objects, maps are ideal when you need to keep track of objects at run-time.
See this link for the current status of ES6 support in all modern browser engines.
We are a leading niche digital & tech recruitment specialist for the North East of England. We Specialise in the acquisition of high-performing technology talent across a variety of IT sectors including Digital & Technology Software Development.
Our ultimate goal is to make a positive impact on every client and candidate we serve - from the initial call and introduction, right up to the final delivery, we want our clients and candidates to feel they have had a beneficial and productive experience.
If you’re looking to start your journey in sourcing talent or find your dream job, you’ll need a passionate, motivated team of experts to guide you. Check out our Jobs page for open vacancies. If interested, contact us or call 0191 620 0123 for a quick chat with our team.
Back to Blog