how to implement regions/code collapse in javascript

Prasad picture Prasad · Dec 17, 2009 · Viewed 127.3k times · Source

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 code folding with regions as in vb/C#.

#region My Code

#endregion

Answer

Kaushik Thanki picture Kaushik Thanki · Feb 15, 2016

Good news for developers who is working with latest version of visual studio

The Web Essentials are coming with this feature .

Check this out

enter image description here

Note: For VS 2017 use JavaScript Regions : https://marketplace.visualstudio.com/items?itemName=MadsKristensen.JavaScriptRegions