Comment existing code JS code from previous project to get gist, comment current JS code, write comment pseudo code for what is needed for current code, and in the header of the file write a full description of the purpose and usage of the file for current JS file.