Add offset snippet

This commit is contained in:
Angelos Chalaris
2018-04-10 19:07:50 +03:00
parent e0b8ff673e
commit 409a0e7ac9
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;