Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

JavaScript (ECMAScript 5) Tutorial [closed]

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.

like image 593
apokaliptis Avatar asked Aug 04 '11 23:08

apokaliptis


People also ask

Is JavaScript ES7 out?

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.

What's closure in JavaScript?

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.

Where are closures used in JavaScript?

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 use JavaScript strict mode?

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.


1 Answers

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.

like image 147
OnesimusUnbound Avatar answered Nov 15 '22 07:11

OnesimusUnbound