Created
March 7, 2017 04:44
-
-
Save Underdoge/6d597bba9684a94f2d54d87a990eda93 to your computer and use it in GitHub Desktop.
extractEachKth
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function extractEachKth(inputArray, k) { | |
return inputArray.filter((curr,index)=>{ | |
if((index+1)%k!=0) | |
return curr; | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment