JavaScript ES6 Arrow Functions: Syntax & the 'this' Keyword Explained

preview_player
Показать описание
Learn JavaScript ES6 Arrow Functions, new syntax & the usage of the "this" keyword.

In this video, we are going to talk about the arrow functions. One of the most loved features of ES6 is arrow functions. When you start working with ES6, you'll use arrow functions a lot. They are preferred by many developers because of the simplified syntax and the solution that it brings to the usage of the "this" keyword.

-------------------------------- Follow Me on Twitter ------------------------------------

#javascript #es6 #arrowfunctions #webdevelopment #programming #frontend
Рекомендации по теме
Комментарии
Автор

I have spent almost the last 24 hours trying go through countless videos and articles to wrap my head around this concept. I feel your explanation was the most in depth and simple to understand. Dropped a like and a subscribe. Please keep going. Happy Coding!!

rpnrko
Автор

2022. Man, you deserve MUCH MUCH MORE VIEWS! Thank you so much!

MilkyWay-rufx
Автор

Thanks for the good explanation of 'this' with arrow functions.

For this case, can you explain to me why the following is the Window object :

const video = {
title : 'ATitle',
play : () => {
console.log(this);
let innerFunc = () =>{
console.log(this)
}
innerFunc();
}
}

video.play(); // Window object

the play method is also using an arrow function, and therefore its a window object. but im not fully sure why thats tha case.

Vyprs
Автор

Thank you for explaining this so clearly! :)

liemhalim
Автор

hello cem, i just read your articles on freecodecamp on callbacks and promises. i find your explanation is in depth and very beginner friendly at the same time. i would like to request you to come with a full tutorial series on javascript, es6 and react and nodejs if possible. this is my humble request.

srimoyeebanerjee
Автор

Nice video but would be better proper terminology such as lexical scope for 'this' explanation was used as well as how hoisintg if affected. It's always good to learn proper teminology so someone's eyes don't pop put when they get asked proper questions at interviews.

webcoderltd