let

Read More at MDN DocsView Spec

Safe to Use

let is considered safe to use.

It’s supported by 93% of global browsers.

Browsers

ChromeMar 2, 2016v49.0.0
26%100%
There are no users of Chrome running a supported version.
SafariSep 20, 2016v10.0.0
5%96%
There are no users of Safari running a supported version.
EdgeAug 2, 2016v14.0.0
5%100%
100% of Edge users are running a supported version.
FirefoxJan 26, 2016v44.0.0
3%100%
100% of Firefox users are running a supported version.

Servers

Node.jsApr 26, 2016v6.0.0
Node.js supports this feature.
DenoMay 4, 2020v1.0.0
Deno supports this feature.

Version Breakdown

 
Agent
Support
Adoption
Chrome
Mar 2, 2016 v49.0.0
26%100%
There are no users of Chrome running a supported version.
Mar 2, 2016 – Latest
v49.0.0+
26%100%

Full Support

Mar 3, 2015 – Mar 2, 2016
v41.0.0 – v49.0.0
0%0%

Partial Support

Strict mode is required.

Chrome Android
Mar 9, 2016 v49.0.0
36%100%
100% of Chrome Android users are running a supported version.
Mar 9, 2016 – Latest
v49.0.0+
36%100%

Full Support

Mar 11, 2015 – Mar 9, 2016
v41.0.0 – v49.0.0

Partial Support

Strict mode is required.

Deno
May 4, 2020 v1.0.0
Deno supports this feature.
May 4, 2020 – Latest
v1.0.0+

Full Support

Edge
Aug 2, 2016 v14.0.0
5%100%
100% of Edge users are running a supported version.
Aug 2, 2016 – Latest
v14.0.0+
5%100%

Full Support

Jul 28, 2015 – Aug 2, 2016
v12.0.0 – v14.0.0

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.

Firefox
Jan 26, 2016 v44.0.0
3%100%
100% of Firefox users are running a supported version.
Jan 26, 2016 – Latest
v44.0.0+
3%100%

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.

Firefox for Android
Jan 26, 2016 v44.0.0
Firefox for Android supports this feature.
Jan 26, 2016 – Latest
v44.0.0+

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.

Internet Explorer
Unsupported
Internet Explorer does not support this feature.
Oct 17, 2013 – Latest
v11.0.0+
0%83%

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.

Node.js
Apr 26, 2016 v6.0.0
Node.js supports this feature.
Apr 26, 2016 – Latest
v6.0.0+

Full Support

 
Quest Browser
Unknown v5.0.0
Quest Browser supports this feature.
Unknown
v5.0.0+

Full Support

Opera
Oct 8, 2013 v17.0.0
1%100%
100% of Opera users are running a supported version.
Oct 8, 2013 – Latest
v17.0.0+
1%100%

Full Support

Opera Android
Nov 20, 2013 v18.0.0
Opera Android supports this feature.
Nov 20, 2013 – Latest
v18.0.0+

Full Support

Safari
Sep 20, 2016 v10.0.0
5%96%
There are no users of Safari running a supported version.
Sep 20, 2016 – Latest
v10.0.0+
5%96%

Full Support

Safari on iOS
Sep 13, 2016 v10.0.0
16%99%
There are no users of Safari on iOS running a supported version.
Sep 13, 2016 – Latest
v10.0.0+
16%99%

Full Support

Samsung Internet
Dec 15, 2016 v5.0.0
2%95%
There are no users of Samsung Internet running a supported version.
Dec 15, 2016 – Latest
v5.0.0+
2%95%

Full Support

Mar 11, 2016 – Dec 15, 2016
v4.0.0 – v5.0.0
0%1%

Partial Support

Strict mode is required.

WebView Android
Mar 9, 2016 v49.0.0
WebView Android supports this feature.
Mar 9, 2016 – Latest
v49.0.0+

Full Support

Mar 11, 2015 – Mar 9, 2016
v41.0.0 – v49.0.0

Partial Support

Strict mode is required.

See Also

Contribute