> Hoisting is in general a bit counter-intuitive, but you get the same with a `var` statement, only that the value is `undefined` and you'll get an error if try to call it.

That's my point. With `var` the behaviour is consistent regardless of whether the value being assigned happens to be a function:

```javascript
console.log(f);
console.log(g);
console.log(x);
console.log(y);
function f() {}
var g = function() {};
var x = 1;
```

```shell
$ node hoisting
[Function: f]
undefined
undefined

/private/tmp/hoisting.js:4
console.log(y);
            ^
ReferenceError: y is not defined
```

`g` and `x` are both undefined prior to assignment, as one would expect. The special case for function declarations means that `f` is available *before* it is defined. I don't think this inconsistency should be abused without good reason.

> Also, ES6 will specify the `name` property of functions and it will be set if the function is the initial argument in a variable declaration. Therefore, this change will be unnecessary as soon as V8 implements the correct behavior.

This is very interesting to learn!