title: Triangle Quiz Cant Able to figureout how to do this
body: <p>Directions:
  For this quiz, you're going to create a function called buildTriangle() that will accept an input (the triangle at its widest width) and will build a triangle. See the example output below.</p>
  
  <p>buildTriangle(10);
  Returns
  <a href="https://ibin.co/3Dv8ajw80RxV.png" rel="nofollow noreferrer">https://ibin.co/3Dv8ajw80RxV.png</a>
  see image </p>
  
  <p>We've given you one function makeLine() to start with. The function takes in a line length, and builds a line of asterisks and returns the line with a newline character.</p>
  
  <pre><code>function makeLine(length) {
    var line = "";
    for (var j = 1; j &lt;= length; j++) {
      line += "* "
    }
    return line + "\n";
  }
  </code></pre>
  
  <p>You will need to call this makeLine() function in buildTriangle().</p>
  
  <p>This will be the most complicated program you've written yet, so take some time thinking through the problem before diving into the code. What tools will you need from your JavaScript tool belt? Professionals plan out their code before writing anything. Think through the steps your code will need to take and write them down in order. Then go through your list and convert each step into actual code. Good luck!</p>
  
  <pre><code>my code!!
  /*
   * Programming Quiz: Build A Triangle (5-3)
   */
  
  // creates a line of * for a given length
  let line;
  function makeLine(length) {
       line = "";
      for (var j = 1; j &lt;= length; j++) {
          line += "* ";
      }
      return console.log(line + "\n");
  }
  
  // your code goes here.  Make sure you call makeLine() in your own code.
  
  function buildTriangle(num) {
      for(var i = 1;i &lt; num+1;i++) {
          makeLine(i);
  
      }
  }
  
  buildTriangle(10);
  </code></pre>
  
  <p>can it be better using only functions and loops no extra crazy stuff ?</p>