Easy example:
var b = function (msg) {
(function inn() {
console.log(msg);
var msg = 0;
})();
} b("15");
This code will log 'undefined' because the local 'msg' on line #4 was declared before this line is actually executed. Are there any points in documentation on this?
Uncaught SyntaxError: Unexpected token )Uncaught SyntaxError: Unexpected identifierb("15")on a new line or a;after the function call