<table>
<head>
<th>#</th>
<th>Name</th>
</head>
<body>
</body>
</table>
<script>
let cars = ['Honda', 'Ferrari', 'Lambhorgini'];
let data = '';
let body = document.querySelector('body');
for(var i=0; i< cars.length; i++)
{
data = data + '<tr><td>' + (i+1) + '</td><td>' + cars[i] +'</td></tr>';
}
body.appendChild(data);
</script>