reverse array sort array javascript code example Example: reverse array javascript var rev = arr.reverse();