main
Last change
on this file was 79a0317, checked in by stefan toskovski <stefantoska84@…>, 6 days ago |
F4 Finalna Verzija
|
-
Property mode
set to
100644
|
File size:
419 bytes
|
Rev | Line | |
---|
[79a0317] | 1 | 'use strict';
|
---|
| 2 | var lengthOfArrayLike = require('../internals/length-of-array-like');
|
---|
| 3 |
|
---|
| 4 | // https://tc39.es/proposal-change-array-by-copy/#sec-array.prototype.toReversed
|
---|
| 5 | // https://tc39.es/proposal-change-array-by-copy/#sec-%typedarray%.prototype.toReversed
|
---|
| 6 | module.exports = function (O, C) {
|
---|
| 7 | var len = lengthOfArrayLike(O);
|
---|
| 8 | var A = new C(len);
|
---|
| 9 | var k = 0;
|
---|
| 10 | for (; k < len; k++) A[k] = O[len - k - 1];
|
---|
| 11 | return A;
|
---|
| 12 | };
|
---|
Note:
See
TracBrowser
for help on using the repository browser.