title: Issue with recursive function in javascript
body: <p>I am practicing using recursive functions to solve some simple javascript problems.</p>
  
  <p>I am running into an issue with the following code,</p>
  
  <pre><code>var locate = function(arr,value){
      for (var i=0; i &lt;arr.length; i++) {
          if(typeof arr[i]=== "string") {
              console.log("string is string");
              if(arr[i]=== value) {
                  console.log("This should be true");
                  return true;
              }
          }
          else {
              locate(arr[i], value);
          } 
      }
  }
  console.log(locate(['d', 'a',['e', 'g']], 'e'));
  </code></pre>
  
  <p>I cannot get this program to return true.  It gets to the right part of the code, as it prints the statement above it.</p>
  
  <p>Any help would be appreciated.  I have been banging my head at this for a couple of hours now.</p>
  
  <p>Edit-@Matt Burland pointed out the fact that you need to include a return statement when calling the recursive.</p>