Function.prototype.toString()function now returns exactly what is written in the source code. This includes whitespace and other text that may have been used. For example, if there is a comment between the function keyword and the function name, the comment is now returned in addition to the keyword and name.
JSON is now a syntactic subset of ECMAScript, which allows line separator (U+2028) and paragraph separator (U+2029) symbols in string literals.
catchclause of a
trystatement can now be used without a parameter.
String.prototype.trimLeft()are now available as the standards-based way of trimming whitespace from strings, in addition to
String.prototype.trim()which was already implemented. The non-standard
trimRight()remain as aliases of the new methods for backward compatibility.
Array.prototype.values()method returns a new array iterator object that contains the values for each index in the array.