Rotate //JavaScript Repository

rotate([1,2,3], 2) = 2,3,1
rotate([1,2,3], -2) = 3,1,2
rotate([1,2,3], 1000) = 3,1,2