6 ms·
'reversed' a-la python
by amitport 5y ago
'reversed' a-la python
- lucacasonato 5y agoCurrently in stage 2 as `Array.prototype.toReversed`: https://github.com/tc39/proposal-change-array-by-copy https://github.com/tc39/proposal-change-array-by-copy
- amitport 5y agoNice, I didn't know about that, but in any case note that IMO it should be part of the Iterable protocol. Also note that the proposal above creates a copy on reverse AFAIKT.