js:var vs let

it2026-04-10  4

{ var a = 2 } console.log(a); // 2 { let b = 3; } console.log(b); // err b is not defined

  

转载于:https://www.cnblogs.com/ax-null/p/6791799.html

最新回复(0)