Skip to content

Commit 511eb74

Browse files
Merge pull request mdn#332 from tankris/patch-1
Update contact-search.html
2 parents d7b7769 + da001f8 commit 511eb74

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

javascript/building-blocks/loops/contact-search.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
if(splitContact[0].toLowerCase() === searchName) {
3232
para.textContent = splitContact[0] + '\'s number is ' + splitContact[1] + '.';
3333
break;
34-
} else {
34+
} else if(i === contacts.length - 1) {
3535
para.textContent = 'Contact not found.';
3636
}
3737
}

0 commit comments

Comments
 (0)