Basic JavaScript - Profile Lookup

I mean the solution taken from here

it didn’t work because I accidentally erased contacts when copying and pasting