My website contains many sections. I tried so far to put variables and functions for each sections in block scope. Why isn't this programming style used anywhere? Why does no one use global block scopes in the main JavaScript file?
What I mean:
// Global Functions //
...
// End Global Functions //
// Scroll Scope //
{
...
}
// End Scroll Scope //
// Change Theme Scope //
{
...
}
// End Toggle Menu Scope //
// Filter Gallery Scope //
{
...
}
// End Filter Scope //