JavaScript Date(): How to Build a Date from Components #javascript #webdevelopment #jstutorial
JavaScript dates look simple until they’re not. Here’s the second way to create a date: pass the components manually. Year, month, day, hour, minute—each as a separate number. And anything you skip defaults to zero. So you can write just the year, month, and day like this……but there’s a catch coming.