I am still learning JS, but I am stuck on a little challenge where I need to output date to ddmmyyyy. Don't know really how do I add that or it's just a brain error.
This is as far as I have come:
var d= new Date(); var m=((d.getMonth()+1)<10)?'0'+(d.getMonth()+1):(d.getMonth()+1); return d.getDate() + m + d.getFullYear();
I tried adding .padStart(2, "0"); to the day, but it won't work and told that it's not a function.
Much appreciated!