O'Reilly logo

Single Page Web Applications: JavaScript end-to-end by Michael S. Mikowski and Josh C. Powell

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

Appendix A. JavaScript coding standard

This appendix covers:
  • Exploring why a coding standard is important
  • Laying out and documenting code consistently
  • Naming variables consistently
  • Isolating code using namespaces
  • Organizing files and ensuring consistent syntax
  • Validating code using JSLint
  • Using of a template that embodies the standard

Coding standards are contentious. Almost everyone agrees you should have one, but few seem to agree on what the standard should be. Let’s consider why a coding standard is especially important for JavaScript.

A.1. Why we need a coding standard

Having a well-defined standard for a loosely typed, dynamic language like JavaScript is almost certainly more important than with stricter languages. ...

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