Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

⚗ Reverse Array In Place:

Be sure to manipulate the passed array, do not return a new one.

    import reverseArrayInPlace from '../'

    const inputArr = [1, 2, 3, 4, 5, 6, 7, 8]
    const outputArr = [8, 7, 6, 5, 4, 3, 2, 1]

    expect(reverseArrayInPlace(inputArr)).toEqual(outputArr)