title: Find a value within a Javascript array
body: <p>I am doing an exercise on JavaScript. But I get an error. Cant find what is wrong. The script should check the array if the "name" exist.</p>
  
  <pre class="lang-js prettyprint-override"><code>// Array with names
  
  var names = ["Alex", "Mike", "John"];
  
  
  // Function checks if name exist
  
  name.checkName = function(name) {
    return (this[name] &gt;= 0) ?
      alert(name + " is there!") :
      alert(name + " is not there!")
  };
  
  
  //Function call
  
  name.checkName('Alex');
  </code></pre>