JSFiddle - React, Tailwind, and code Playground
by farrukhsubhani
HTML
<input id="ct" value="3" />
JavaScript
yourarray=[];
for (i = 0; i <4; i++) {
temparray=[];
for (j = 0; j < 5; j++) {
temparray.push($('#ct').val()) //your values here
}
yourarray.push(temparray);
}
console.log(yourarray);
//with custome names
yourarray=[];
for (i = 0; i <4; i++) {
eval("temparray"+i+"=[]");
for (j = 0; j < 5; j++) {
eval("temparray"+i+".push($('#ct').val())"); //your values here
}
console.log(eval("temparray"));
yourarray.push(eval("temparray"));
}
console.log(yourarray);