How to add region in java script file, visual studio
This works great on Visual Studio 2017 ( I haven't tried with other versions)
Java Script Regions
JavaScriptRegions
It depends only on the IDE.
vscode, for example, added support for code regions in september 2017
https://code.visualstudio.com/updates/v1_17#_folding-regions
For javascript:
//#region
code
//#endregion
or
//region
and
//endregion
The same syntax could work also in different IDEs.