title: Compare numbers in Array using for loop
body: <p>I have a prob to solve, I have to use a loop to step through each position in
  an array of " winning numbers"to check whether the variable customer number (input from keyboard) matches any of the winning numbers.
  I must use a For loop to step through each position in the winning numbers array and to compare the customer number to each number the array contains.
  I cannot use any method to achieve this problem
  Thanks for your help!
   here what I did so far:</p>
  
  <pre><code>var customerNumbers = prompt("Enter your number:");
  var winningNumbers = [12, 17, 24, 37, 38, 43];    
  
  for (var i = 0; i &lt; winningNumbers.length; i++) {
  
      if (customerNumbers == 12 || //condition determinates the winning numbers
          customerNumbers == 17 ||
          customerNumbers == 24 ||
          customerNumbers == 37 ||
          customerNumbers == 38 ||
          customerNumbers == 43)
          alert("This week Winning numbers are:" + "\n" + "\n" + winningNumbers + "\n" + "\n" + "The customer's Number is:" + "\n" + "\n" + customerNumbers + "\n" + "\n" + "We have a match and a winner!");
  } else {
      alert("This week Winning numbers are:" + "\n" + "\n" + winningNumbers + "\n" + "\n" + "The customer's Number is:" + "\n" + "\n" + customerNumbers + "\n" + "\n" + "Sorry you are not a winner this week");
  }
  </code></pre>