title: SyntaxError: missing ) after for-loop control what is wrong?
body: <p>I just started learning javascript and I am trying to create a recursive function to find the smallest value in an array , but this error occured. I am not very familiar with javascript syntax and I cannot make out what is wrong with my code. </p>
  
  <pre><code>function min(array) {
  counter = 0;
  function check(y) {
      for ( var i = 0 ; len = array.length ; i &lt; len ; i++ ) { 
          if ( y &gt; array[i] ) {
              check(array[counter++]);
          }
      }
  
      return array[counter] ;     
  }
  
  check(array[counter]);
  
  
  }
  </code></pre>
  
  <p><b>Also here is a screenshot of the error : </b></p>
  
  <p><img src="https://i.imgur.com/99II8HD.png"></p>