Challenge: Filtering Corporate Email Addresses
Aufgabe
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
.
Lösung
solution
War alles klar?
Danke für Ihr Feedback!
Abschnitt 1. Kapitel 5