Pages needed for item count

Code reviewMedium13 min

Your task

Review this JavaScript that returns the number of pages needed to show count items at perPage per page.