JS-スコープ
const a = "i'm a"; console.log(a); // "i'm a" function func1() { const a = 'second a'; console.log(a); // "second a" function func2() { let a; console.log(a); // undefined } func2(); } func1();
A Pen by Takaaki Sato on CodePen.
License.