Add offset snippet

This commit is contained in:
Angelos Chalaris
2018-04-10 19:07:50 +03:00
parent 7cea814b6e
commit 6405c7f14d
6 changed files with 1104 additions and 1056 deletions

2
test/offset/offset.js Normal file
View File

@ -0,0 +1,2 @@
const offset = (arr, offset) => [...arr.slice(offset), ...arr.slice(0, offset)];
module.exports = offset;