Function Declarations VS Function Expressions in JavaScript



JavaScript provides 2 methods for defining a function: the function declaration and the function expression. In this video we examine the difference, which includes hoisting and the emphasis on first class functions. We also take a look at when you might want to use a named function expression as opposed to an anonymous function expression.

Would you like to help keep this channel going?
https://www.patreon.com/allthingsjavascript

For a complete list of all our tutorials:
http://www.allthingsjavascript.com/youtube.html

Take the Learn Modern JavaScript: Getting Started or the Learn Modern JavaScript: Advanced Topics courses at a huge discount:
https://www.udemy.com/learn-modern-javascript-getting-started/?couponCode=YOUTUBE
https://www.udemy.com/learn-modern-javascript-advanced-topics/?couponCode=YOUTUBE

Original source

25 thoughts on “Function Declarations VS Function Expressions in JavaScript

Leave a Reply