title: multiple constructor in javascript
body: <p>I have a question: I was wondering if it is possible to simulate the
  multiple constructors, like in Java (yes, I know that the languages are
  completely different)?</p>
  
  <p>Let's say that I have a class called "Point" which would have two
  values "x" and "y".</p>
  
  <p>Now, let's say if it were the Java version, I would want two
  constructors: one that accept two numbers, the other accepts a string:</p>
  
  <pre><code>public class Point {
      private int x;
      private int y;
      public Point(int x, int y) {
          this.x = x;
          this.y = y;
      }
      public Point(String coord) {
          this.x = coord.charAt(0);
          this.y = coord.charAt(1);
      }
      //...
  }
  
  
  //In JavaScript, so far I have
  Point = function() {
      var x;
      var y;
      //...
  }
  </code></pre>
  
  <p>Is it possible to have two declarations for the Point.prototype.init?
  Is it even possible to have multiple constructors in JavaScript?</p>