js inverse array code example Example: reverse array javascript const list = [1, 2, 3, 4, 5]; list.reverse();