[ "function doSomething() { }", "function doSomething() { function somethingElse() { } }", "(function() { function doSomething() { } }());", "if (test) { const fn = function() { }; }", "if (test) { const fn = function expr() { }; }", "function decl() { var fn = function expr() { }; }", "function decl(arg) { var fn; if (arg) { fn = function() { }; } }", "function decl(arg) { var fn; if (arg) { fn = function expr() { }; } }", "var x = {doSomething() {function doSomethingElse() {}}}", "function decl(arg) { var fn; if (arg) { fn = function expr() { }; } }", "if (test) { let x = 1; }", "if (test) { const x = 1; }", "var foo;", "var foo = 42;", "function doSomething() { var foo; }", "(function() { var foo; }());", "foo(() => { function bar() { } });", "var fn = () => {var foo;}", "var x = {doSomething() {var foo;}}", "exports.foo = () => {}", "exports.foo = function(){}", "module.exports = function foo(){}", "class C { method() { function foo() {} } }", "class C { method() { var x; } }", "class C { static { var x; } }" ]