Day 100: Date Time to Number of 100DaysCodingChallenge
Hello all, #day100 Day100 Today's my task was to Write a Program to Convert Date and Time to Number. I have started the 100 days of coding challenge to improve my programming skills.. Code : // program to display the date // get local machine date time const date = new Date(); const datetime = Date.now(); // get the date as a string const n = date.toDateString(); // get the time as a string //const time = datetime.toLocalTimeString(); let t = datetime.toString(); let time = date.getTime(); //let dt = time.toLocalTimeString(); // display date console.log('Date: ' + date); // display time //console.log('Time: ' + time); console.log(t); Output : Happy Coding:) Day 100 Of 100 Days Coding Challenge Thank you...