How to get the current month name in JavaScript

1 Answer

0 votes
const dt = new Date();

const monthName = dt.toLocaleString("default", {month: "long"});

console.log(monthName); 

   
    
    
     
/*
run:
     
"June"
     
*/

 



answered Jun 26, 2021 by avibootz

Related questions

1 answer 137 views
1 answer 136 views
1 answer 136 views
2 answers 162 views
1 answer 160 views
1 answer 135 views
...