how to implement regions/code collapse in javascript

后端 未结 17 1674
灰色年华
灰色年华 2020-11-28 21:01

How can you implement regions a.k.a. code collapse for JavaScript in Visual Studio?

If there are hundreds of lines in javascript, it\'ll be more understandable using

17条回答
  •  星月不相逢
    2020-11-28 21:36

    Not only for VS but nearly for all editors.

    (function /* RegionName */ () { ... })();

    Warning: has disadvantages such as scope.

提交回复
热议问题