I'm trying to add dates inside table headers starting from the current date and increment it for about 3 weeks.
This is what I have done in my script.js

function insertDate(){
for (var i=0; i<24; i++) {
var currentTime = new Date()
var month = currentTime.getMonth() + 1
var day = currentTime.getDate()
var year = currentTime.getFullYear()
var currDate = day + "." + month + "." + year

document.getElementById("head" + i).innerHTML = currDate;


But it is not showing any date inside the table headers. Could some help or tell me what I am doing wrong.