title: Object vs Class vs Function
body: <p>I was wondering - what's the difference between JavaScript objects, classes and functions?
  Am I right in thinking that classes and functions are types of objects?</p>
  
  <p>And what distinguishes a class from a function? Or are they really the same thing, just the term for them changes according to how they are used?</p>
  
  <pre><code>function func() { alert('foo'); } // a function
  func(); // call the function - alerts 'foo'
  var func2 = function () { alert('hello'); } // acts the same way as 'func' surely?
  func2(); // alerts 'hello'
  
  var Class = function() { alert('bar'); }; // a class
  var c = new Class(); // an istance of a class - alerts 'bar'
  </code></pre>
  
  <p>Sure, classes have methods and properties and can be instantiated - but then, I could do the same with any old function - or not?</p>