Date in TypeScript
Let the variable store the date, which we will create using JavaScript via the new Date command.
It turns out that our variable will have the type Date:
let date: Date;
Let's write an object with a date containing the current moment in time into this variable:
let date: Date = new Date;
Now let's write an object with a date containing a given point in time:
let date: Date = new Date(2030, 11, 31);
Make a variable that will contain the date object.