Daniel Schwarz 2 months ago
Front-end development
Converted...

const endDate = ("0" + endDateTime.getDate()).slice(-2);

Into...

const endDate = (endDateTime.getDate() + "").padStart(2, "0");

Because I learned .padStart(); and this way is more readable.