1var fullDate = new Date();console.log(fullDate);
2var twoDigitMonth = fullDate.getMonth()+"";if(twoDigitMonth.length==1) twoDigitMonth="0" +twoDigitMonth;
3var twoDigitDate = fullDate.getDate()+"";if(twoDigitDate.length==1) twoDigitDate="0" +twoDigitDate;
4var currentDate = twoDigitDate + "/" + twoDigitMonth + "/" + fullDate.getFullYear();console.log(currentDate);
1var d = new Date();
2
3var month = d.getMonth()+1;
4var day = d.getDate();
5
6var output = d.getFullYear() + '/' +
7 (month<10 ? '0' : '') + month + '/' +
8 (day<10 ? '0' : '') + day;
9