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 127 views
1 answer 127 views
1 answer 135 views
2 answers 193 views
1 answer 138 views
1 answer 171 views
...