# Javascript: Splitting an array into chunks (utility function)

2 min readJan 23, 2019

--

For a work project, I needed to include a wizard form with 2 questions on each page. To get the total page count, I divided the total number of questions by 2 and then rounded it off to the nearest integer. There were however some problems with that implementation and a more efficient solution was required.