A few best practices for when you’re learning the language

With every programming language, there’s a list of do’s and don’ts and JavaScript is no exception. Some of these best practices are there for your protection (like always always always using semi-colons!), some to make your code more readable and less error-prone, and some to increase the efficiency of your code.

If you search for “best practices JavaScript” you’ll find lots of great information on the topic. You’ll also find a few disagreements (for instance, always use comma separated variable declarations vs. never use comma separated variable declarations). That said, there are some fundamental best practices that can really help you write better code. It worth spending some time to learn a few these as you learn JavaScript. And of course, over time, you’ll even develop a few of your own.

In this installment of Head First JavaScript Programming Teasers, we take a look at a few common best practices that will help make your code more readable, make the best use of the language, and make your code a bit more efficient.

Previous Head First JavaScript Programming Teasers Episodes

Pin It on Pinterest

Share This

Give your Brain a Treat!

Don't miss out on brain-friendly updates, new WickedlySmart Projects, early access to books and general cool stuff! Just give us your email and we'll send you something about once a week. Don't worry, we'll never sell your name and you can remove yourself at any time.

Check your email to confirm your subscription.