JavaScript
🔧 Functions
Your first superpower: write the logic once and reuse it a thousand times. Declarations, expressions, arrow functions and parameters.
What you'll learn
- Tell a function declaration apart from an expression and explain how hoisting affects each one.
- Write arrow functions with implicit return and return object literals using parentheses.
- Define parameters with default values and return results with
return. - Create higher-order functions that receive or return other functions.
Lessons
Function declaration vs expressionThe two classic ways to create functions. Arrow functionsThe modern, compact syntax with =>. Parameters, default values and returnInputs, outputs and default values. Functions as valuesFunctions that are stored, passed and returned.Practice this module in the app
DevPath is a hands-on course: you read the theory here; in the app you put it into practice with exercises that really run, offline.
Start free in the app →