Skip to content

cssmonkey/groupArrayElements

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

groupArrayElements

This coding challenge to demonstates some small executable code.

The groupArrayElements function should:

  • Given an array of length >= 0, and a positive integer N, return the contents of the array divided into N equally sized arrays.
  • Where the size of the original array cannot be divided equally by N, the final part should have a length equal to the remainder

How to get started

Install the required npm packages

npm i

Run tests

The following npm script will execute unit tests written in Jest

npm test

Other notes

Normally I'd use tools such as babel or TypeScript, webpack etc but didn't consider this a requirement for this coding challenge.

The best way to see the code in action is to run the tests.

About

JavaScript coding challenge

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors