New Array Features, Typed Arrays
T.J. Crowder · 2020
This chapter discusses many new features of arrays in ES2015, including new features for traditional arrays and the new typed arrays. ES2015 (primarily), ES2016, and ES2019 added a host of new array methods, both for creating arrays and for accessing and modifying their contents. The new array methods include Array.of, Array.from, Array.prototype.keys, Array.prototype.values, Array.prototype.entries, Array.prototype.copyWithin, Array.prototype.find, Array.prototype.findIndex, Array.prototype.fill, Array.prototype.includes, Array.prototype.flat, and Array.prototype.flatMap. The typed arrays are true arrays of primitive numeric values, added to JavaScript in ES2015. The chapter lists the types of typed arrays, giving the name of the type, the conceptual name of its value type, how many bytes of memory an entry in that array takes, the abstract specification operation that converts values to the type, and a brief description.