JSFiddle - React, Tailwind, and code Playground
by abhiklpm
JavaScript
// find elements
var rows = 3;
var cols = 3;
//var colHeadings = ['state', 'discount', 'total'];
var result = [];
for(i=0;i<rows;i++){
var temp = {};
for(j=0;j<cols;j++){
temp[j] = '';
}
result.push(temp);
}
console.log(result);