I'm trying to add five minutes to the current time using milliseconds and am baffled why adding and subtracting give such different results:
const now = new Date();
const gimmeFive = now + 300000;
const takeFive = now - 300000;
Respectively give:
"Sun May 31 2020 23:06:48 GMT+0100 (British Summer Time)300000"
1590962508207
Why does subtraction work, but not addition? How can I add time?
Added clarification per stack overflow prompt: while the Q here overlapped with Add 10 seconds to a Date, it differed in seeking to understand why the add and subtract operators show different behaviours (as explained by RobG, for which, much thanks!)