Errors. Today we're going to look at a new function syntax that
came with ES6 - arrow functions. Next, we'll
take a look at how to use these functions to handle DOM
2015 and allow us to declare our own functions similarly as we can do with the
function keyword. They were added to JS for two reasons:
- Their syntax is shorter, which makes it much easier to pass them as parameters
- They fix a flaw of the original
function, where the context of the
thiskeyword doesn't work within the
Arrow functions do not replace the
and are only used in situations we're going to explain in more detail below.
...End of the preview...
You've come here and that's great! We believe that the first lessons showed you something new and useful
Do you want to continue the course? Go to the premium section.
- Unlimited and permanent access to individual lessons.
- High quality IT knowledge.
- Skills to help you get your dream and well-paid job.
Requested article covers this content:
You gain points by supporting our network. This is done by sending a helpful amount of money to support the site, or by creating content for the network.