=========================================
add days to current Date usign JS Date class
This takes care of automatically incrementing the month if necessary. For example:
8/31 + 1 day will become 9/1.
#prototype
Date.prototype.addDays = function(days){
this.setDate( this.getDate() + days);
}
let date = new Date();
date.addDays(5);
console.log(`extended date: ${date.toDateString()}`);
#HungryCoder. #javascript #js-date
We are highly motivated to make people skilled and expert in technology.