Create exercise 5

This commit is contained in:
LSvekis
2021-09-06 12:01:36 -04:00
committed by GitHub
parent cfe5a67fa7
commit 8cfc035f5a
+8
View File
@@ -0,0 +1,8 @@
let future = new Date(2025, 5, 15);
console.log(future);
const months = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"];
let day = future.getDate();
let month = future.getMonth();
let year = future.getFullYear();
let myDate = `${months[month-1]} ${day} ${year}`;
console.log(myDate);