let
Read More at MDN DocsView SpecSafe to Use
let
is considered safe to use.
It’s supported by 93% of global browsers.
Browsers
Servers
Version Breakdown
Full Support
Full Support
Full Support
Full Support
Partial Support
In Edge 12 and 13, let
within a for
loop initializer does not create a separate variable for each loop iteration as defined by ES2015. Instead, it behaves as though the loop were wrapped in a scoping block with the let
immediately before the loop.
Full Support
Before Firefox 44, let
is only available to code blocks in HTML wrapped in a <script type="application/javascript;version=1.7">
block (or higher version) and has different semantics (e.g. no temporal dead zone).
Before Firefox 46, a TypeError
is thrown on redeclaration instead of a SyntaxError
.
Firefox 54 adds support of let
in workers.
Full Support
Before Firefox 44, let
is only available to code blocks in HTML wrapped in a <script type="application/javascript;version=1.7">
block (or higher version) and has different semantics (e.g. no temporal dead zone).
Before Firefox 46, a TypeError
is thrown on redeclaration instead of a SyntaxError
.
Firefox 54 adds support of let
in workers.
Partial Support
In Internet Explorer, let
within a for
loop initializer does not create a separate variable for each loop iteration as defined by ES2015. Instead, it behaves as though the loop were wrapped in a scoping block with the let
immediately before the loop.
Full Support
Full Support
Full Support
Full Support
Full Support
Full Support
Full Support
Full Support