JSFiddle - React, Tailwind, and code Playground
by stevenkaspar
HTML
<script>
var two_d_array = [];
for(var i = 0; i < 10; i++){
for(var x = 0; x < 10; x++){
if(!two_d_array[i]) two_d_array[i] = [];
two_d_array[i].push(x);
}
}
console.log(two_d_array);
var contacts = [];
for(var i = 0; i < 10; i++){
contacts.push({
first_name: 'John',
last_name: 'Doe',
address: '100 Main Street'
})
}
console.log(contacts);
</script>