Javascript Find Matching Values In Array Python Definition