JavaScript const works in Chrome 49+, Edge 12+, Firefox 36+, Safari 11+, Opera 36+, and Samsung Internet 5+, with partial support in Internet Explorer 11.

Prince Dewani
May 6, 2026
const is an ECMAScript 2015 (ES6) statement that declares a block-scoped variable whose binding cannot be reassigned after initialization. It works in Chrome 49+, Edge 12+, Firefox 36+, Safari 11+, Opera 36+, and Samsung Internet 5+, with partial support in Internet Explorer 11 and no support in Internet Explorer 6 to 10.
This guide covers what const is, the browsers that support it, the key features, the difference between const, let, and var, how to use const in older browsers, and the known limitations.
const is an ECMAScript 2015 declaration statement that creates a block-scoped, read-only binding tied to a value. The engine resolves the binding inside the nearest enclosing block, and it throws a TypeError on any attempt to reassign the variable after the line that declared it.
Every modern desktop and mobile browser supports const by default, while Internet Explorer 11 ships only partial support and earlier Internet Explorer builds do not parse it at all.
Chrome supports const by default from Chrome 49 on Windows, macOS, Linux, ChromeOS, and Android. Chrome 21 to 48 had partial support that allowed the keyword but skipped block scope and proper temporal dead zone behavior. Chrome 4 to 20 did not support const at all.
Microsoft Edge supports const fully from Edge 12 across Windows, macOS, Linux, Android, and iOS. The Chromium-based Edge 79 and later inherits Chrome's V8 implementation, so block scope, temporal dead zone, and reassignment errors all match Chrome behavior on every Edge release in support.
Firefox supports const fully from Firefox 36 on Windows, macOS, Linux, and Android. Firefox 4 to 35 shipped a non-standard, function-scoped const that predates the ES6 spec and behaves more like var with reassignment guarded. Treat anything below Firefox 36 as partial support and transpile when you target it.
Safari supports const fully from Safari 11 on macOS High Sierra, and from Safari 11 on iOS 11 and iPadOS 11. Safari 5.1 to 10 had partial support with spec gaps in block scope inside catch clauses and module-level redeclaration. Safari 5 and earlier do not support const.
Opera supports const fully from Opera 36 on Windows, macOS, Linux, and Android. Opera 12 to 35 had partial support that mirrored the early Chromium implementation. Opera Mini does not run a full JavaScript engine on the device, so its server-side rendering path skips most const-dependent code paths.
Samsung Internet supports const fully from Samsung Internet 5 on Galaxy phones and tablets. Samsung Internet 4 had partial support that tracked the early Chromium build it shipped on top of. The current Samsung Internet engine inherits V8 from Chromium, so const behavior matches Chrome for Android.
Chrome for Android supports const fully on every release in active support, matching desktop Chrome 49 and later. The legacy stock Android Browser used on Android 4.3 and earlier had partial support, with the same block-scope gaps as early Chromium. Modern Android devices ship Chrome, Samsung Internet, or Firefox, all with full support.
Internet Explorer 11 has partial support for const, with several gaps: missing block scope inside catch clauses, inconsistent redeclaration errors, and no temporal dead zone enforcement. Internet Explorer 6 to 10 do not support const at all. Microsoft has retired Internet Explorer, so any site that still targets it should transpile const to var.
Note: const behaves slightly differently across older Safari, Firefox, and Internet Explorer engines. Test it on real browsers and OS with TestMu AI. Try TestMu AI free!
const gives JavaScript four guarantees that var never offered, all enforced at parse time or at the line that runs the declaration.
All three declare variables, but only const and let follow modern block-scope rules. The table below shows the practical differences a QA engineer or developer needs when picking one.
| Behavior | const | let | var |
|---|---|---|---|
| Scope | Block | Block | Function |
| Reassignment allowed | No, throws TypeError | Yes | Yes |
| Initializer required | Yes, SyntaxError without it | No | No |
| Temporal dead zone | Yes | Yes | No, hoists as undefined |
| Redeclaration in same scope | SyntaxError | SyntaxError | Allowed silently |
| Object or array contents | Mutable | Mutable | Mutable |
| Internet Explorer 11 | Partial | Partial | Full |
Older Internet Explorer, early Safari, and pre-36 Firefox builds need a transpilation step that rewrites const to var while preserving the scope rules. The standard tool is Babel with @babel/preset-env, configured against your browserslist target.
// Run in any browser DevTools console to confirm const support and block scope.
try {
new Function("const sample = 1; { const sample = 2; } if (sample !== 1) throw new Error('block-scope-broken');")();
console.log("const declaration: supported");
console.log("Block scope: working");
} catch (error) {
console.warn("const not fully supported:", error.message);
}
try {
new Function("const value = 1; value = 2;")();
console.warn("Reassignment did not throw - const enforcement is broken.");
} catch (error) {
console.log("Reassignment guard: working (" + error.name + ")");
}If the snippet logs a warning, the browser does not enforce const. Ship the transpiled bundle for that user agent and keep the original const-based bundle for modern browsers.
const locks the binding, not the value. That gap, plus a handful of older-browser quirks, is the source of every const-related bug worth knowing.
In my experience, the most common failure is a developer assuming const freezes an object and then watching a teammate mutate the contents in another file. Pair const with Object.freeze, or hand the value out through a getter that returns a defensive copy, when the team needs the value itself to stay constant.
All const version numbers and platform notes in this guide come from these primary sources:
Did you find this page helpful?
More Related Hubs
TestMu AI forEnterprise
Get access to solutions built on Enterprise
grade security, privacy, & compliance