I have an array of timestamps and I want to transform it into dates.
timestamps = [1568666854141, 1568595225048, 1568594645595];
timestamps.forEach(function(d) { d = new Date(d) } )
When I do new Date(d) in debug it gives me Mon Sep 16 2019 16:47:34 GMT-0400 which is good, but if I check my array, it's still the same. It gives me
[1568666854141, 1568595225048, 1568594645595] instead of [Mon Sep 16 2019 16:47:34 GMT-0400, ...]
Why does not every element d reassigns to a date?
timestamps.forEach(function(d, i) { timestamps[i] = new Date(d) } )