Challenge: Filtering Corporate Email Addresses
Завдання
Swipe to start coding
You have a list of employee email addresses, and you need to keep only the corporate emails (those ending with @company.com
).
- Implement a
Predicate
to filter corporate emails that end with@company.com
. - Pass the correct parameters to the
filterEmails
method. - In the
filterEmails
method, iterate through all email addresses using afor-each
loop. - Apply the
Predicate
in theif
condition. - Add the matching emails to the new list
result
.
Рішення
solution
Все було зрозуміло?
Дякуємо за ваш відгук!
Секція 1. Розділ 5