Ep3 - Arrow Function vs Normal Function in JavaScript

preview_player
Показать описание

There are a few ways to define a function in JavaScript. Arrow function is the shorter way in contrast to the traditional syntax. But is that all there is to arrow function?

Read more in my blog:

Understanding the 'this' keyword in JavaScript

------------
Source code for this lesson:


** Affiliated links
Use the legendary Git GUI for FREE! You are seriously missing out if you are not using it.

Beautiful designs created instantly to wow your social networks!

A simple and scalable cloud hosting platform for all developer needs.

Outro Music:
Рекомендации по теме
Комментарии
Автор

Another thing I think is important to mention is that arrow functions are not hoisted, so you cannot call them before you declare them -- Which is not the case with normal functions.

anthonyheinrichs
Автор

The most straight forward video. clean and easy to understand in 5 mins. 😮❤

anandubabukr
Автор

great video, but I had to play it with 0.75 speed hahahaha. subscribed tho =)

joaopaulosr
Автор

nice vid. however, you need to speak faster (sarcasm).

awclewis
Автор

you could just write your "drive" and "honk" function with the console.log straigth, instead create another function inside to print the object properties.
"this" from arrow functions goes for the outer context, while "this" from regular functions aims the current parent object.

jaopreto-wlock
Автор

Thanks. The fried dumplings in the end look delicious.

jizhang
Автор

Thank you, your explanation is very clear and helpful. I started out programming on Leetcode in C++, then moved on to learning Python and Django. I am now trying to learn JS and React but man, JS is so confusing!

kyoungjunhan
Автор

Hey I just subscribed to your channel. I'm a frontend dev and there are still a lot things to learn in details about JS. Thanks a lot for the content.

brandonwie