let
allows you to declare variables that are limited to the scope of a block statement or expression on which it is used, unlike the var
keyword, which declares a variable globally, or locally to an entire function regardless of block scope.
Just like const
the let
does not create properties of the window object when declared globally (in the top-most scope).
To achieve what you want you can use var
/ window.uneligible
instead of let
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…