Clean Input
Clean Input
User input often arrives with extra spaces or inconsistent casing. Cleaning the text first makes later comparisons more predictable.
Your task: Create normalizedTopic from the provided raw topic by removing outside whitespace and converting it to lowercase. Log the normalized value.
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.
Clean Input
User input often arrives with extra spaces or inconsistent casing. Cleaning the text first makes later comparisons more predictable.
Your task: Create normalizedTopic from the provided raw topic by removing outside whitespace and converting it to lowercase. Log the normalized value.