title: How to check all array's elements?
body: <p>I have a function:</p>
  
  <pre><code>function getNumber(number, array){
    for(var i=0; i&lt;array.length; i++){
      if (array[i] == number) {
        return true;
      } else {
        return false;
      }
    }
  }
  
  console.log(getNumber(3, [5, 6, 3, 8]));
  </code></pre>
  
  <p>Of course it'll return 'false' all the time, because of 'return' except those situations when array[0] == number. And my question is how to continue checking process for all array's element? It's elementary I know, but I can't find the solution.</p>