Array methods, and Array and String generics.
E4X (since deprecated)
You can still use the standard MIME type when using E4X:
However, E4X syntax may conflict with the common practice of putting scripts into HTML comments (
<!--...-->) to hide them from old browsers. E4X may also conflict with the more modern practice of putting scripts within XML CDATA sections (
<![CDATA[...]]>) to allow the symbols "<" and ">" in the script (note that this does not apply to HTML). If you see inexplicable syntax errors, add "; e4x=1" to the MIME type:
Note that scripts in extensions always treat HTML comments as E4X literals. That is, the "e4x=1" is implicit.
E4X is documented in Processing XML with E4X.
There are seven new
Array methods that can be separated into two categories, item location methods and iterative methods. The item location methods are:
indexOf()- returns the index of the given item's first occurrence.
lastIndexOf()- returns the index of the given item's last occurrence.
The iterative methods are:
every()- runs a function on items in the array while that function is returning true. It returns true if the function returns true for every item it could visit.
filter()- runs a function on every item in the array and returns an array of all items for which the function returns true.
forEach()- runs a function on every item in the array.
map()- runs a function on every item in the array and returns the results in an array.
some()- runs a function on items in the array while that function returns false. It returns true if the function returns true for any item it could visit.