Javascript is definitely a very popular language on the web, and every web developer has to deal with it someday. For this article Jean-Baptiste Jung has compiled a non-exhaustive list of good practices that will help you to become a better javascript developer.
- 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
Comments
Be the first to write a comment
You must me logged in to write a comment.