Javascript – get yesterday’s date
Kompot 1. method: setDate First, let’s initiate the date and assign it to the “yesterday” variable Next, we will use setDate to set it to yesterday’s date. And now, yesterday’s variable has yesterday’s date.Easy as that! 2. method: Quick and Easy oneliner The first and only step is to initialize the Date with today’s date …