title: What is the purpose of these superfluous curly braces?
body: <p>So I have recently started at a new place of employment and I have run across a format of javascript which makes me question its purpose. ( in particular the brackets {})</p>
  
  <pre><code>var _occurrences = getOccurrences($('#ddlTours').val());
  {
      var _occurrence = getObjectByValue(_occurrences, 'tourID', booking.tourID);
      {
          _occurrenceID = _occurrence.occurrenceID;
      }
  }
  </code></pre>
  
  <p>To me it almost looks like an attempted object construction. i.e.</p>
  
  <pre><code>var _occurrences : // Ignoring = getOccurrences($('#ddlTours').val());
  {
      _occurrence : // Ignoring getObjectByValue(_occurrences, 'tourID', booking.tourID);
      {
          _occurrenceID : _occurrence.occurrenceID;
      }
  }
  </code></pre>
  
  <p>But as I understand it will execute it like.</p>
  
  <pre><code>var _occurrences = getOccurrences($('#ddlTours').val());
  var _occurrence = getObjectByValue(_occurrences, 'tourID', booking.tourID);
  _occurrenceID = _occurrence.occurrenceID;
  </code></pre>
  
  <p>Or is it so _occurrence gets delete and does not sit around as its encapsulated and we assign a var that outside of the encapsulation.
  Does that actually work as a performance improvement? i.e.</p>
  
  <pre><code>Global var a = 1
  {
      b = someFunction()  // After execution because of encapsulation it poofs???
      for(var c in b)
      {
          a += c.somefunction()
      }
  }
  </code></pre>
  
  <p>Another option is that its just bad code?</p>
  
  <p>Or perhaps its meant as a logical separation of code to help the dev?</p>
  
  <p>I was just wondering if someone could shed some light on this for me :)</p>