title: Getting the error 'Expression expected.' when attempting a for loop on the else part of a ternary operator
body: <p>I'm running the following code but getting the error 'Expression expected.' on the for loop. </p>
  
  <pre><code>let nums1 = [1,2,3,4,5].map(String);
  let nums2 = [1,2,3,4,5].map(String);
  
  let compare = (a1, a2) =&gt; {
    (a1.length != a2.length) ? result = false : for(num in a1) {
      if(a1[num] != a2[num]) {
        result = false;
        break;
      }
   }
  return result;
  }
  
  compare(nums1, nums2);
  </code></pre>
  
  <p>I've run the following code (a more lengthy, non ES6 equivalent) which does work.</p>
  
  <pre><code>let nums1 = [1,2,3,4,5].map(String);
  let nums2 = [1,2,3,4,5].map(String);
  
  function temp(arr1, arr2) {
    let result = true;
    if(arr1.length != arr2.length) {
      result = false;
    } else {
      for(let i = 0; i &lt; arr1.length; i++) {
      if(arr1[i] != arr2[i]) {
        result = false;
        break;
      }
     }
   }
   return result;
   }
  </code></pre>
  
  <p>My intention here is to compare two arrays of data. I will eventually look to have a user enter some data in to text boxes on a web page, this code to grab the data in to the two arrays and then compare them, alerting the user as to whether the two sets of data is different or not.</p>