Spread operator No support 49.0 34.0 (34) ? ? ? 49.0 [1] Requires "Enable experimental Javascript features" to be enabled under `about:flags` Firefox-specific notes Firefox provided a non-standard language extension in JS1.7 for destructuring. This extension has been removed in Gecko 40 (Firef...
No compatibility data found. Please contribute data for "javascript.operators.subtraction_assignment" (depth: 1) to the MDN compatibility data repository.See alsoAssignment operators in the JS guide Subtraction operatorRelated Topics JavaScriptTutorials:...
Browser support tables for modern web technologies Created & maintained by @Fyrd, design by @Lensco. Support data contributions by the GitHub community. Usage share statistics by StatCounter GlobalStats for February, 2025 Location detection provided by ipinfo.io. Browser testing done via Suppor...
Firefox ❌ 2 - 54: Not supported ✅ 55 - 135: Supported ✅ 136: Supported ✅ 137 - 139: Supported Chrome ❌ 4 - 59: Not supported ✅ 60 - 133: Supported ✅ 134: Supported ✅ 135 - 137: Supported Safari ❌ 3.1 - 11: Not supported ✅ 11.1 - 18.2: Supported ✅...
To make "bar" a declared variable, you can add thevarkeyword in front of it. function foo() { "use strict"; var bar = true; } foo(); See also Strict mode Document Tags and Contributors Tags: Errors JavaScript ReferenceError Strict Mode ...
You can also use the ternary operator. This provides a compact if else representation.a === 1 ? console.log(1) : console.log('not 1');You can use boolean operations in the expression to create complex predicates. Common boolean operators include && (and), || (or), and ! (not).if...
Splitting off from #35, this proposal is for just one new operator: :=, the block assignment operator. So the great advantage of let/const is its block-scoping, i.e.: let a = 1; if (true) { let b = 2; } console.log(b); // undefined This ...
JavaScript operator: Exponentiation assignment (`x **= y`) Global usage 95.76% + 0% = 95.76% IE ❌ 6 - 10: Not supported ❌ 11: Not supported Edge ❌ 12 - 13: Not supported ✅ 14 - 133: Supported ✅ 134: Supported Firefox ❌ 2 - 51: Not supported ✅ 52 - 135: ...
JavaScript operator: Division assignment (`x /= y`) Global usage 96.73% + 0% = 96.73% IE ✅ 6 - 10: Supported ✅ 11: Supported Edge ✅ 12 - 133: Supported ✅ 134: Supported Firefox ✅ 2 - 136: Supported ✅ 137: Supported ✅ 138 - 140: Supported Chrome ✅ 4 - 134...
Spread operatorNo support49.034.0 (34)???49.0 [1] Requires "Enable experimental Javascript features" to be enabled under `about:flags` Firefox-specific notes Firefox provided a non-standard language extension inJS1.7for destructuring. This extension has been removed in Gecko 40 (Firefox 40 / Thu...