How to increment a date by 1 month in JavaScript

1 Answer

0 votes
const date = new Date();

date.setMonth(date.getMonth() + 1);

console.log(date.toDateString()); 


  
  
  
  
/*
run:
  
"Wed Apr 06 2022"
  
*/

 



answered Mar 6, 2022 by avibootz

Related questions

1 answer 230 views
1 answer 223 views
1 answer 231 views
2 answers 303 views
1 answer 221 views
1 answer 274 views
...