Search e01
One query across the encyclopedia, books, dictionary, papers, Wikidata and the developer library. Every hit carries its source.
7 results across 6 corpora for Array.prototype.toReversed().
Encyclopedia 1
ECMAScript version history
t alternative to . === 14th edition – ECMAScript 2023 === The 14th edition, ECMAScript 2023, was published in June 2023. This version introduces the toSorted , toReversed , with , findLast , and findLastIndex methods on Array.prototype and TypedArray.prototype , as well as the toSpliced method on Array.prototype ; added support for #! shebang comments at the beginning of files to better facilitate executable ECMAScri
Developer library 6
Array
`undefined` elements include the following: entries(), fill(), find(), findIndex(), findLast(), findLastIndex(), includes(), join(), keys(), toLocaleString(), toReversed(), toSorted(), toSpliced(), values(), and with(). ```js const colors = ["red", "yellow", "blue"]; colors[5] = "purple"; const iterator = colors.keys(); for (const key of iterator) { console.log(`${key}: ${colors[key]}`); } // Output // 0: red //
Array.prototype.toSpliced()
ray) - [es-shims polyfill of `Array.prototype.toSpliced`](https://www.npmjs.com/package/array.prototype.tospliced) - Array.prototype.splice() - Array.prototype.toReversed() - Array.prototype.toSorted() - Array.prototype.with()
Array.prototype.reverse()
he array will be turned towards the direction opposite to that previously stated. To reverse the elements in an array without mutating the original array, use toReversed(). JavaScript Demo: Array.prototype.reverse() ```js interactive-example const array = ["one", "two", "three"]; console.log("array:", array); // Expected output: "array:" Array ["one", "two", "three"] const reversed = array.reverse(); console.log(
Array.prototype.toSorted()
.com/package/array.prototype.tosorted) - [Indexed collections](/docs/Web/JavaScript/Guide/Indexed_collections) guide - Array.prototype.sort() - Array.prototype.toReversed() - Array.prototype.toSpliced() - Array.prototype.with() - TypedArray.prototype.toSorted()
Array.prototype.toReversed()
The **`toReversed()`** method of Array instances is the [copying](/docs/Web/JavaScript/Reference/Global_Objects/Array#copying_methods_and_mutating_methods) counterpart of the reverse() method. It returns a new array with the elements in reversed order. ## Syntax ```js-nolint toReversed() ``` ### Parameters None. ### Return value A new array containing the elements in reversed order. ## Description The `toReve
Array.prototype.with()
type.with`](https://www.npmjs.com/package/array.prototype.with) - [Indexed collections](/docs/Web/JavaScript/Guide/Indexed_collections) guide - Array.prototype.toReversed() - Array.prototype.toSorted() - Array.prototype.toSpliced() - Array.prototype.at() - TypedArray.prototype.with()