Use .getMinutes() to get the current minutes, then add 20 and use .setMinutes() to update the date object.
.getMinutes()
.setMinutes()
var twentyMinutesLater = new Date(); twentyMinutesLater.setMinutes(twentyMinutesLater.getMinutes() + 20);
548k questions
547k answers
4 comments
86.3k users