r/javascript • • May 28 '19

What are some JavaScript things beginners don't know?

333 Upvotes

383 comments sorted by

View all comments

Show parent comments

0

u/[deleted] May 28 '19

[deleted]

5

u/amdc !CURSED! May 28 '19

that's pretty much everywhere

0

u/[deleted] May 28 '19

[deleted]

0

u/the_argus May 28 '19

It's not array based. The months come back zero based so you can have an array of month names and get the correct label. See also Date.prototype.getDay() for day of the week labels.