title: Is there a need to initialize variables that are passed as a "class" constructor arguments in Javascript?
body: <p>I come from a Java background, where everything is Object Oriented.  While Getting into a bit more of Javascript (more into the class areas of javascript), I've noticed complete changes.  The biggest for me is getting used to the prototyping of the so-called "classes" javascript has.  So, my question is if you need to intialize the varialbes you pass into your class function constructor method-thing.  For example: </p>
  
  <pre><code>function Foo(a, b, c) {
      this.a = a;
      var b = b;
      this.c = "";
  
      this.d = a + b;
  }
  </code></pre>
  
  <p>Now In javascript is this necessary? Cause in Java, you have to show that the variable type definition in the argument itself: <code>Foo(int a, int b, string c)</code>   Now how does the method in Javascript know what type of data structure it is being passed too? Like what if they passed in an array for a, and then my code tried to add the integer and the array together? That won't push the int too the array will it?</p>
  
  <p>Sorry for being a bit questiony, I've been looking for an answer for a while on the Google... And it's getting late here.</p>
  
  <p>Thanks for any help</p>
  
  <p>Uneveris</p>