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

We wrote the book: with over a 1,000,000 books sold, we’ve created some of the industries top-selling software & technology titles. We teach the experts: you find us teaching on today’s premier training sites, like Lynda.com and Safaribook’s Online, and we’ve created digital experiences for a small, but exceptional group of industry leaders and luminaries. Throughout it all, we’ve applied our wickedly smart philosophy to get you there faster with amazing results. How can we help you?

We wrote the book: with over a 1,000,000 books sold, we’ve created some of the industries top-selling software & technology titles. We teach the experts: you find us teaching on today’s premier training sites, like Lynda.com and Safaribook’s Online, and we’ve created digital experiences for a small, but exceptional group of industry leaders and luminaries. Throughout it all, we’ve applied our wickedly smart philosophy to get you there faster with amazing results. How can we help you?

Don't miss out!

Don't miss out on brain-friendly WickedlySmart updates early access to books and general cool stuff! Just give us your email and we'll send you something about once a week. 

You have Successfully Subscribed!