title: Array is in a Descending or Ascending order
body: <p>I have a job interview and they gave me a few questions to practice on
  one of them is:
  Check if Array is in a Descending or Ascending order and alert message if Descending and if Ascending, and none of the above if not sorted.</p>
  
  <p>this is what I wrote but it's not working :</p>
  
  <pre><code>for ( i = 0; i &lt; myArrey2.length; i++) {
      if (myArrey2[i] &gt; myArrey2[i + 1]) {
          alert ("Ascending");
      } else if(myArrey2[i] &lt; myArrey2[i + 1]){
          alert ("Descending");
      }else {
          alert("not sorrted");
      }
      break;
  }
  </code></pre>
  
  <p>can somebody assist me whit this one?
  thanks for the help.</p>