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 ...

Get Sams Teach Yourself JavaScript™ in 24 Hours, Fifth Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.