Guest User

Untitled

a guest
Jun 18th, 2018
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.27 KB | None | 0 0
  1. function test_loop(int_to_find) {
  2. arr = [1,2,3,4,5,6,7,8,9,10]
  3. arr.each(function(i){
  4. if (i == int_to_find) {
  5. return i;
  6. } else {
  7. console.log(i+" wasn't what you were looking for, keep looking")
  8. }
  9. })
  10. }
Add Comment
Please, Sign In to add comment