9. Mask Email Address

Write a function `maskEmail` that takes an email address and returns it with the middle characters of the username replaced by asterisks (e.g., `j***e@example.com`).

Examples:

Input: maskEmail('johndoe@example.com')
Output: "j***e@example.com"
Explanation: Middle of 'johndoe' is masked.
Input: maskEmail('a@b.com')
Output: "a@b.com"
Explanation: Username too short to mask.
SolutionJavaScript
Test Results
Click "Run Code" to test your solution