Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- peoContactExists(contact: PEOContact): boolean {
- const contactAddressId = contact.address.addressId;
- let contactExists = false;
- this.contacts.forEach(peoContact => {
- if (peoContact.address.addressId === contactAddressId) { contactExists = true; }
- });
- return contactExists;
- }
- peoContactExists(contact: PEOContact): boolean {
- return this.contacts.some(peoContact => peoContact.address.addressId === contact.address.addressId);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement