reverse order of elements with javascript code example Example: reversing an array in js var arr=[1,2,5,6,2] arr.reverse()