Declarations vs Expressions, Arrow Basics
Function declarations vs expressions, arrow function syntax, and simple usage patterns.
Intro
Goal: Tell function declarations from expressions, learn basic arrow syntax, and pick the simplest form for the job.
- Declaration
- Expression
- Arrow basics

Function declaration
A function declaration is hoisted, so calls may appear above the definition.
// Function declaration
// Can be called before or after its definition (hoisted)
console.log(greet("Ayla"));
function greet(name) {
return "Hello, " + name + "!";
}
console.log(greet("Coder"));

All lessons in this course
- Declarations vs Expressions, Arrow Basics
- Parameters, Defaults, Rest, and Returns
- this Basics; call/apply/bind (intro)