I hear that ECMAScript 5 is now getting supported by most of the latest browsers. Are there any good tutorials out there? I tried looking myself but I didn't find anything. Is the ES5 documentation the only thing out there? I mainly want to know what has been depreciated in the new standard. If I avoid these i can feel right at home when I move to ES5 and I wont miss anything depreciated.
ES5 was published in 2009 and after that, the major release was ES6 in 2015, ES7 in 2016, Es8 in 2017, Es9 in 2018, Es10 in 2019.
A closure is the combination of a function bundled together (enclosed) with references to its surrounding state (the lexical environment). In other words, a closure gives you access to an outer function's scope from an inner function.
Closures are frequently used in JavaScript for object data privacy, in event handlers and callback functions, and in partial applications, currying, and other functional programming patterns.
Why Strict Mode? Strict mode makes it easier to write "secure" JavaScript. Strict mode changes previously accepted "bad syntax" into real errors. As an example, in normal JavaScript, mistyping a variable name creates a new global variable.
Referring to ECMAScript 5 compatibility table page, Firefox 4 - 6 and Chrome 13 - 14 are the most compatible browsers.
The Mozilla JavaScript Reference might be the closest. See its entry for ECMAScript5 support for details.
Update (2011-08-05)
It appears that ES5 is backward compatible with ES3 (1, 2). The only way to break the compatibility is to use "use strict" to enable a subset of ES5 deemed as less error prone.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With