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 224 views
1 answer 221 views
1 answer 227 views
2 answers 298 views
1 answer 217 views
1 answer 269 views
...