r/javascript • • May 28 '19

What are some JavaScript things beginners don't know?

333 Upvotes

383 comments sorted by

View all comments

141

u/inabahare May 28 '19

Using const and let

0

u/[deleted] May 28 '19

[deleted]

33

u/[deleted] May 28 '19

VSCode masterrace but WebStorm is right here. (Modern) JS shouldn't use var when not explicitly needed.

26

u/[deleted] May 28 '19 edited May 28 '19

It's not an IDE that errors anything, it's linters. And VSCode comes with ESLint which gives a warning for var usage with default rules, so idk what you're talking about.

5

u/ingrown_hair May 28 '19

What’s a good lint rule set for beginners? I’ve been writing JS for 6 years. I recently started with the AirBnB set and it’s draining my will to live.

6

u/[deleted] May 28 '19

I have been using AirBnb for a couple of years now and I love it. It's strict and rules make sense.

2

u/micppp May 28 '19

This. I’ve turned only one or two rules off in legacy projects but other than that I think it’s near perfect.