I am a developer who has used Javascript quite a long time ago, (the days before jQuery became norm), and am now getting back into it with ES5/ES6 and such new libraries. I know that modern Javascript is not a hole-proof language and has a lot of “gotchas” and pitfalls.
I was wondering if there were any resources available or common pitfall libraries that might provide answers to problems similar to how linters recognize issues and report.
Things such as:
- Where to use a
for...in
versusfor...of
loop.- How to instantiate an object (i.e.
{}
versusObject.create(...)
)- Catching of
hasOwnProperty
pitfalls
Right now my only real way to learn these types of common issues is to just use a linter and program alongside it, reading documentation as I go when an error arrives. Is there an easier way? I feel like the only thing holding me back as a Javascript developer is it’s uncertainty of the “secure path” for primitive concepts.
My apologies if this question is too broad or opinion-based, but I’m sure there’s some resources out there. My next step if there is not is to just write some myself, but I am no expert.