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