Assume that users will make every typing mistake the software allows them to, because they will. Test with multiple browser versions. If you install IE3 after installing IE4, you'll have to reinstall your operating system. Test on as many platforms as you have access to. Comment your source thoroughly.
Uncommented code is difficult to reuse and impossible to modify.
Sample code is intended for reuse, so make the lives of your fellow developers as easy as possible. Enclose the body of your scripts in HTML comments to avoid displaying JavaScript source code on non-JavaScript browsers.