let, const, class hoisting

오픈소스·2020년 12월 26일
0

https://www.rubypaper.co.kr/82


let foo = 1;
{
  console.log(foo); // ReferenceError: foo is not defined
  let foo = 2;
}
const foo = new Foo(); // ReferenceError: Foo is not defined
class Foo {}

0개의 댓글