JSFiddle - React, Tailwind, and code Playground

by jfriend00

JavaScript

var i, test = [];

function dumpArray(a) {
    $(document.body).append(a.join(",") + "<br>");
}

for(i=0; i<5; i++) {
    test.push(i);
    dumpArray(test);
}