A best practice in programming is to adhere to a consistent style guide. It allows for more readable code and easier maintenance. All code looks uniform even when multiple people contribute to it. JavaScript doesn’t have one set standard style guide. There are a couple of different style guide options though. These are provided by AirBnb, Google, W3 Schools, Robert Waldron’s Idiomatic Guide, Standard JS and jQuery. It doesn’t matter which one you use, just pick one and follow it. If you’re working on a team, follow the team’s style convention.
The JavaScript tutorial series starts with this post.
(paid links)
Leave a Reply
You must be logged in to post a comment.