We can use the built-in JavaScript date object to work with and manipulate dates.
Note: Due to how StackBlitz works, the console will be shown differently. When opened and viewed through the browser, it should show as followed in the image below.
The JavaScript date object has helpful functions to work with dates in your code. Like type manipulation functions…