title: convert length to point in svg (polygon) dynamically
body: <p>I am doing a small assignment to find out the type of the triangle whether is equilateral, isosceles, or scalene based on the values <code>a,b,c</code>.</p>
  <p>my problem is that I couldn't manage to convert the <code>a,b,c</code> values in order to draw the shape by using SVG (polygon) since it takes points and I have only values</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>function triangle(a, b, c) {
    if (a === b &amp;&amp; a === c &amp;&amp; b === c) return "equilateral";
    if (a === b &amp;&amp; a === c) return "isosceles";
    else {
      return "scalene";
    }
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code> &lt;div&gt;
          &lt;svg className="traingle" height="400" width="400"&gt;
            &lt;polygon points={`200 ${b}, 200 ${a}, 0 ${c}`} /&gt;
          &lt;/svg&gt;
        &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>
  <p><a href="https://i.stack.imgur.com/Jg2sm.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Jg2sm.png" alt="enter image description here" /></a></p>