you are viewing a single comment's thread
view the rest of the comments
[–] 1 point 2 years ago

Looks confusing at first, but I found it nice for accessing a month array.

const months = ["Jan", "Feb", ...];

months[0] === "Jan";

const label = months[date.getMonth()];
  • source
  • parent