const x = 1; function func1() { const x = 2; return function() { console.log(x); } } const func2 = func1(); func2();