Read it here:
http://www.catswhocode.com/blog/best-practices-for-modern-javascript-development
The list includes:
- Use the correct <script> tag
- Keep your code in an external file
- Don't wrap code in HTML comments
- Use a framework
- Always declare your variables using var
- Keep your code unobstructive
- Include your scripts at the bottom of your HTML files
- Use JSLint
- Don't use document.write
No comments:
Post a Comment