+ 1
Want to know how to get date
on JavaScript eg "02/06/1996" https://www.sololearn.com/discuss/492702/?ref=app
2 Respuestas
+ 12
// Just a single line
var date = new Date( );
But the date will be not printed with your date format, so... add this other methods to get the expected result as output:
https://code.sololearn.com/WtA3iTpx783n/?ref=app
"date.getMonth() + 1" because months start from zero and we want that January will be 1 rather than 0.
For the rest it's pretty understandable, just default methods separated from a slash (/) sign, you can learn them following the Javascript course.
0
my example of date()
https://code.sololearn.com/WfdzG4geSl59