Is ECMAScript 5 available in any other browser?

I want to experiment with some of the new ECMAScript 5 features. I would like to do some things similar to some kind of code that I found when searching on googling:

var obj = {}; Object.defineProperty( obj, "value", { value: true, writable: false, enumerable: true, configurable: true }); (function(){ var name = "John"; Object.defineProperty( obj, "name", { get: function(){ return name; }, set: function(value){ name = value; } }); })(); print( obj.value ) // true print( obj.name ); // John obj.name = "Ted"; print( obj.name ); // Ted 

Perhaps this is generally possible?

+6
source share
1 answer

Here is a great compatibility table: http://kangax.github.com/es5-compat-table/

For completeness, there are also tables for ECMA6 and non-standard .

+8
source

Source: https://habr.com/ru/post/912876/


All Articles