MCPcopy Create free account
hub / github.com/marijnh/Eloquent-JavaScript / 04_2_reversing_an_array.js

File 04_2_reversing_an_array.js

code/solutions/04_2_reversing_an_array.js:None–None  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1function reverseArray(array) {
2 let output = [];
3 for (let i = array.length - 1; i >= 0; i--) {
4 output.push(array[i]);

Callers

nothing calls this directly

Calls 2

reverseArrayFunction · 0.85
reverseArrayInPlaceFunction · 0.85

Tested by

no test coverage detected