title: Write a JavaScript conditional statement to sort three number
body: <p>This is my code. It's fairly simple...I do not understand why it's giving me a result of 2, 1, 3 no matter what I do and not 1, 2 , 3 when I try to sort 3, 2 and 1. Did I make a mistake somewhere in my logic or the code?</p>
  
  <pre><code>function sort (a, b, c) {
    if(a &lt; b &amp;&amp; b &lt; c) {
      document.write(a, b , c);
    } else if (a &lt; b &amp;&amp; c &lt; b) {
      document.write(a, c, b);
    } else if (b &lt; a &amp;&amp; a &lt; c) {
      document.write(b, a, c);
    } else if(b &lt; a &amp;&amp; c &lt; a) {
      document.write(b, c, a); 
    } else if(c &lt; a &amp;&amp; a &lt; b) {
      document.write(c, a, b);
    } else {
      document.write(c, b , a);
    }
  }
  
  sort(3,2,1);
  </code></pre>