with
This feature is discouraged. Consider using Destructuring instead. For the rationale, see:
The with
JavaScript statement adds a given object to the chain of scopes used to evaluate names.
Status
Discouraged
MDN documentation
Specifications
- ECMAScript® 2026 Language Specification (#sec-with-statement), from TC39 (Ecma International).
Browser support
- Chrome 38 Released on 2014-10-07
- Chrome Android 38 Released on 2014-10-08
- Edge 12 Released on 2015-07-29
- Firefox 48 Released on 2016-08-02
- Firefox for Android 48 Released on 2016-08-02
- Safari 10 Released on 2016-09-20
- Safari on iOS 10 Released on 2016-09-13
View as JSON | Edit this feature | Report an issue | Web-features entry: source, dist