The solution above has a major error in the first if statement. The first if statement was supposed to be:
if (contacts].firstName === name) {
Also, notice where the “No such contact” is returned.
The solution above has a major error in the first if statement. The first if statement was supposed to be:
if (contacts].firstName === name) {
Also, notice where the “No such contact” is returned.