code: public String jsModuleNames() {
  
          List<String> moduleNames = sortModules(getAvailableModules().values());
          StringBuffer jsCode = new StringBuffer(1024);
          jsCode.append("\t// an array from 1...n holding the module package names\n");
          jsCode.append("\tvar modulePackageNames = new Array(");
          jsCode.append(moduleNames.size());
          jsCode.append(");\n");
          for (int i = 0; i < moduleNames.size(); i++) {
              String moduleName = moduleNames.get(i);
              jsCode.append("\tmodulePackageNames[" + i + "] = \"" + moduleName + "\";\n");
          }
          jsCode.append("\n\n");
          return jsCode.toString();
      }
docs: Returns js code with array definition for the available module names.<p>
  
  @return js code