Code playground (JavaScript) | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
+ 2

Code playground (JavaScript)

ā€˜getMonth();ā€™ is getting January ( 1 ) but itā€™s February ( 2 )? https://code.sololearn.com/W3cVov3ygu6r/?ref=app

27th Feb 2022, 6:11 PM
Jamescabc
Jamescabc - avatar
3 Respostas
+ 4
.getMonth() is zero based, i.e. values range from 0 to 11, not 1 to 12. https://www.w3schools.blog/getmonth-javascript-js
27th Feb 2022, 6:15 PM
Simon Sauter
Simon Sauter - avatar
+ 3
Thank you
27th Feb 2022, 6:17 PM
Jamescabc
Jamescabc - avatar
0
ŠžŠ¾
26th Nov 2022, 11:58 PM
The Fallen King
The Fallen King - avatar