I just came across two very useful references for debugging JavaScript and using HTML5 canvas. They are very short and will require not more than a few minutes to go through.
Two very useful references
Previous post: Getting Your Shaders Into Your WebGL Code
Next post: Project (Program Group 2): Graphics Town