JSFiddle - React, Tailwind, and code Playground

JavaScript

var i, test = [];
for(i=0; i<5; i++) {
    test.push(i);
    document.write('['+test+']');
}