Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I_2 #2

Open
noopn opened this issue Aug 14, 2018 · 0 comments
Open

I_2 #2

noopn opened this issue Aug 14, 2018 · 0 comments

Comments

@noopn
Copy link
Owner

noopn commented Aug 14, 2018

const arr = [11, 12, 13, 14, 22, 23, 24, 25];
const chunk = (arr,length) =>{
  let index = 0,
  len = arr.length;
  narr = [];
while(index<len){
  narr.push(arr.slice(index,index+=length))
}
  return narr;
}
@noopn noopn changed the title 按指定长度给数组分组 chunk I_2 Aug 16, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant