Skip to content

Comment Style Guide

  • Page sections
    Use hash blocks for top-level boundaries:

    //######################################################################
    // UPDATE PAGE
    //######################################################################
  • Variable blocks
    Use equals sign blocks for shared variable declarations:

    //======================================================================
    // VARIABLES
    //======================================================================
  • Page loader functions
    Keep dashed blocks for loader-specific sections (matches functions.js lines 16‑18):

    //----------------------------------------------------------------------
    // LOGIN UPDATE LOADER FUNCTION
    //----------------------------------------------------------------------
  • Sub-function containers (page-specific helpers)
    Use the chevron wrapper to highlight grouped helpers (lines 37‑39):

    // >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
    // UPDATING THE APPLICATION NOW
    // <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
  • Individual helper descriptions
    Inside those sections, use concise block comments per helper to describe intent:

    /*** Handles token refresh before update ***/
    function refreshAuthToken() { ... }
  • Keep widths consistent (~70 chars) so blocks align visually.
  • Stick to uppercase titles for headings; sentence case for inline block comments.
  • Document side effects or gotchas in the helper comment rather than repeating obvious names.
  • When a helper grows beyond a few lines, add brief inline numbered comments to explain complex steps.