Strings

Normalize Input

Normalize Input

User-entered text often has accidental spaces and inconsistent casing. A reusable normalizer should return a cleaned copy without changing the input value.

Your task: Write normalizeEmail. It should remove outside whitespace and convert the email to lowercase.

Free with a JS Exercises account

Sign in to start coding, run your solution, and keep your progress saved for later. No payment needed.

By continuing, you agree to our Terms and Privacy Policy. We'll send occasional product updates and news. You can unsubscribe anytime.

Normalize Input

User-entered text often has accidental spaces and inconsistent casing. A reusable normalizer should return a cleaned copy without changing the input value.

Your task: Write normalizeEmail. It should remove outside whitespace and convert the email to lowercase.

Free with a JS Exercises account

Sign in to start coding, run your solution, and keep your progress saved for later. No payment needed.

By continuing, you agree to our Terms and Privacy Policy. We'll send occasional product updates and news. You can unsubscribe anytime.

Console

Run code to see output.