title: Why does same javascript code give different result?
body: <p>I am a beginner at javascript. I find following piece of code a bit difficult for me. I think both are same, and should have give the same result. But they are throwing different result.</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>var a = 5,
    b = 6,
    c = 7;
  
  if (a + b &gt; c || b + c &gt; a || a + c &gt; b) {
    let s = (a + b + c) / 2;
    let area = Math.sqrt(s * ((s - a) * (s - b) * (s - c)));
    console.log(`The area of the triangle is: ${area}`);
  } else {
    console.log('Triangle does not exist');
  }</code></pre>
  </div>
  </div>
  </p>
  <p>It gives me a result. But when i try to take input from user and input the same value (5,6,7), find different result.</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>var a = prompt(),
    b = prompt(),
    c = prompt();
  
  if (a + b &gt; c || b + c &gt; a || a + c &gt; b) {
    let s = (a + b + c) / 2;
    let area = Math.sqrt(s * ((s - a) * (s - b) * (s - c)));
    console.log(`The area of the triangle is: ${area}`);
  } else {
    console.log('Triangle does not exist');
  }</code></pre>
  </div>
  </div>
  </p>
  <p>Maybe I am wrong. But I just want know the reason.</p>
  <p>Thanks.</p>