Today's topic is Function Declarations vs. Function Expressions. You can find a graphical view on instagram -
Function Declarations
Function Declarations are normal function we write!
See an example--
Function Expressions
The function keyword can be used to define a function inside an expression.
See an example--
You must ask this in mind Why this is important ?
Because this pattern is used widely in JavaScript, this will help you to understand and write small functions easily inside of a expression.
Finally see both example at once –-
Comment out if you have any question & are you enjoying this series ?
Originally it published on nerdjfpbblog. You can connect with me in twitter or linkedin !
Top comments (0)