I'm trying to add 3 minutes to the time but instead of adding to the time, it instead acted like they're two strings and added them together like they're strings. What am I doing wrong?
var minutes = 3;
console.log(date.getTime() + (minutes * 60 * 1000));
new Date(new Date().getTime() + (3 * 60 * 1000))
. What are the types and values ofdate
anddata.getTime()
?