title: What does it do?
body: <p>I'm quite new in JavaScript and jQuery, can someone please explain to me what this lines of code do? if is possible if someone can write in detail explanation...<br>
  For instance, what is function (context) - is context representing the attributes/properties such as jQ: trummedVal: etc... or?    </p>
  
  <pre><code>var servis = false;
  
  var FormData = function () {
  var topThat = this;
  this.trimValue = function (control) {
      return typeof control.val() !== 'undefined' ? control.val().trim() : control.val();
  },
  this.transportMode= {
      jQ: $('#transportMode'),
      trimmedVal: function () { return topThat.trimValue($('#transportMode')); },
      name: "Type of transport",
      mandatory: !servis &amp;&amp; true,
      hookupEvents: function (context) {
          // populating order data
          if ($(".newApp").length != 0) {
              context.jQ.change(function () {
                  if (topThat.ctrId.trimmedVal() !== '')
                      topThat.populateOrderData();
  
                  if ($(this).val().trim() === "TRUCK")
                      $(".reg").show();
                  else {
                      $(".reg").hide();
                  }
              });
          }
      }
  };
  $(document).ready(function () {
  
  if ($("#servis").length &gt; 0)
      servis = true;
  
  var page = new FormData();
  page.init();
  });
  </code></pre>