The function below accepts any non-empty string as a valid email address.
The bug: invalid emails like "notanemail" or "@missing.com" are accepted, causing downstream failures (bounced sends, database constraint violations, user frustration).
Your task: fix solve(email) to return true only for structurally valid email addresses.
A valid email for this exercise must:
1. Have a non-empty local part (before @)
2. Contain exactly one @ character
3. Have a domain with at least one dot and a non-empty TLD
solve('user@example.com') // → true
solve('user+tag@sub.domain.io') // → true
solve('notanemail') // → false
solve('@missing.com') // → false
solve('user@') // → false
solve('') // → falseSample tests