Files
30-seconds-of-code/test/everyNth/everyNth.js
2018-01-09 06:09:49 -05:00

1 line
73 B
JavaScript

module.exports = (arr, nth) => arr.filter((e, i) => i % nth === nth - 1);