/twig-test

Primary LanguageJavaScript

Twig coding challenge

Implement a function with the specified criteria:

  • 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.

Installation instructions

Install Node

To install node.js. Follow the instructions below:

https://nodejs.org/en/

Install npm packages

npm i

Run tests

npm test