Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
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
1
function
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
reverseArray
Function · 0.85
reverseArrayInPlace
Function · 0.85
Tested by
no test coverage detected