title: Stuck on 5.3.4 codeHS program (JavaScript)
body: <p>In the lesson the instructions are to:</p>
  
  <p>Write a function that draws horizontal lines on the graphics canvas. If a line is horizontal, then the y-values for the endpoints are the same. The parameters to your function should be the y location, and the length, and all of your lines should start at x position 0. Your function must be named horizontalLine.</p>
  
  <p>For example if you call:</p>
  
  <pre><code>horizontalLine(100, 200);
  </code></pre>
  
  <p>you should get a horizontal line of length 200 starting at position (0, 100).</p>
  
  <p>If your start function looks like:</p>
  
  <pre><code>function start(){
      horizontalLine(100, 200);
      horizontalLine(200, 100);   
      horizontalLine(300, 20);
  }
  </code></pre>
  
  <p>The ending world should look like <a href="https://i.stack.imgur.com/8Kyyr.png" rel="nofollow noreferrer">this</a>. Now I've gotten my world to look exactly like that but the code check returns wrong. I'm not sure whats wrong with my code but I'm guessing its because it wants me to input two numbers instead of the four in my start function but I can't get it to work. I've been stuck on this for nearly a month and the answer is probably really simple but I can't figure it out, please help.</p>
  
  <p>This is my code:</p>
  
  <pre><code>function start() {
      horizontalLine(0, 100, 200, 100);
      horizontalLine(0, 200, 100, 200);   
      horizontalLine(0, 300, 20, 300);
  }
  
  function horizontalLine (x1, y1, x2, y2) {
      var x1 = 0;
      var y1 = y2;
      var line = new Line (x1, y1, x2, y2);
      add(line);
  }
  </code></pre>