Function Expression

A function expression is part of an assignment and does not get hoisted:

1
2
3
const myFunction = function (): number {
return 1337;
}

Arrow Function Expression

Compact form of writing a function expression which got introduced in ES6:

1
const myFunction = (): number => 1337;