Skip to content

Instantly share code, notes, and snippets.

@Underdoge
Created March 7, 2017 04:44
Show Gist options
  • Save Underdoge/6d597bba9684a94f2d54d87a990eda93 to your computer and use it in GitHub Desktop.
Save Underdoge/6d597bba9684a94f2d54d87a990eda93 to your computer and use it in GitHub Desktop.
extractEachKth
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