This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Your first condition in loop should check if name is equal. If it satisfy Then you should check if the property exists If it exists return the value else return no such property.If No such name is found then it will come out of loop and you can return no such contact. | |
var contacts = [ | |
{ | |
"firstName": "Akira", | |
"lastName": "Laine", | |
"number": "0543236543", |