function chunk(arr, maxSize) {
    const result = []
    for (let i = 0; i < arr.length; i += maxSize) {
        result.push(arr.slice(i, i + maxSize))
    }
    return result
}

function range(start, stop) {
    const result = []
    for (let i = start; i < stop; i++) {
        result.push(i)
    }
    return result
}

console.log(chunk(range(1, 100), 5))

Embed on website

To embed this program on your website, copy the following code and paste it into your website's HTML: