I think I've been unclear. When I say function definition I'm referring to this:
function foo() {
console.log('bar');
}
And when referring to a function expression I'm talking about this: var foo = function () {
console.log('bar');
};
The latter needs to be terminated with a semicolon to prevent ambiguity (in some situations), while the former does not. This for example is valid JavaScript: function foo() {
console.log('bar');
}foo=5