A function declaration `function declared() {}` & a function expression e.g. `var bar = function expressed() {}`: the former is hoisted, the latter can be immediately invoked and can be anonymous (eg can omit the name "expressed"). "function" as the first word of a statement at global scope or directly inside a function starts a function declaration; otherwise, it starts a function expression.

In other words, a function declaration implicitly makes it's name present in the context, and hoists it above every variable value. Relying on hoisting imo is an easy way to lead to complex and unreadable code.