Write a function swapItems(items, i, j) that swaps two elements of the array items: the element at index i and the element at index j.
items itself and return that same array, not a new one. The other elements stay where they are.0. i and j are always valid indexes of items. They can be equal (then nothing changes), and i can be greater than j.7 and the string '7' are different values). The same value can appear more than once: swap by position, not by value.swapItems(['a', 'b', 'c'], 0, 2)Returns [ 'c', 'b', 'a' ]
swapItems([1, 2, 3, 4], 1, 2)Returns [ 1, 3, 2, 4 ]
swapItems([5, 6, 7], 1, 1)Returns [ 5, 6, 7 ]
swapItems([ 'a', 'b', 'c' ], 0, 2)[ 'c', 'b', 'a' ]swapItems([ 1, 2, 3, 4 ], 1, 2)[ 1, 3, 2, 4 ]swapItems([ 5, 6, 7 ], 1, 1)[ 5, 6, 7 ]Hidden tests run on Submit.