O'Reilly logo

Sams Teach Yourself JavaScript™ in 24 Hours, Fifth Edition by Phil Ballard, Michael Moncur

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Hour 14. Good Coding Practice

What You’ll Learn in This Hour

• How to avoid overuse of JavaScript

• Write readable and maintainable code

• About graceful degradation

• About progressive enhancement

• How to separate style, content, and code

• Writing unobtrusive JavaScript

• Using feature detection

• Avoiding inline code such as event handlers

• How to handle errors well

JavaScript has gained an unfortunate reputation in certain circles. Because its main goal as a scripting language was to add functionality to web page designs, accessibility for first-time programmers has always been an important aspect of the language. Unfortunately, that has often led to poorly written code being allowed into web pages, leading to frustration for more software-savvy ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required