Skip to Content
0 likes
Why Your Date Is Off by One Day Level: Intermediate

Your date moves a day because one part of the code uses UTC and another uses local time. Find which step does it, keep calendar days as YYYY-MM-DD strings, and name the time zone when you format.

0 likes
Destructuring Function Parameters With Defaults Level: Intermediate

Replace long lists of positional arguments with one options object, destructured in the parameter list with defaults. Add = {} so a call with no argument doesn't crash, and know that defaults only replace undefined.