If I have the following array
let initialdates = [2019-12-07,2019-12-08, NaN-NaN-NaN]
Why does the following not work for my process in removing the NaN....
let initialdates = [2019 - 12 - 07, 2019 - 12 - 08, NaN - NaN - NaN]
for (let [index, dateField] of initialdates.entries()) {
if (isNaN(dateField)) {
initialdates[dateField] = "found issue";
}
}
console.log('the final array is: ' + initialdates);
It still prints out...
the final array is: 2019-12-07,2019-12-02,NaN-NaN-NaN
2019 - 12 - 07is2000which is not a date.