UNPKG

@extra-array/rotate

Version:
9 lines (5 loc) 124 B
const array = require("extra-array"); var x = [1, 2, 3, 4]; array.rotate(x, 1); array.rotate(x, 2); array.rotate(x, -1);