js reverse print array code example Example: reversing an array in js var arr=[1,2,5,6,2] arr.reverse()