title: Overloading Functions in JavaScript
body: <p>I have been using jQuery for a year, but I still don't understand how this code works:</p>
  
  <pre><code>alert($('#elementID').val()); // It gets the value of element
  
  $('#elementID').val('setting Value'); // the same function is setting value
  </code></pre>
  
  <p>some other functions of jquery also do the same like <code>.html()</code></p>
  
  <p>I want to know how this thing is achieved? How do they overload a javascript function?</p>