What is the primary use case for the trim() method?
const text = ' Hello World ';
const cleaned = text.trim();
trim() specializes in whitespace removal: 1) Removes leading and trailing whitespace, 2) Handles all whitespace characters (spaces, tabs, newlines), 3) Returns new string without modifying original, 4) Essential for cleaning user input, 5) Commonly used in form validation, 6) More efficient than regex-based approaches, 7) Also available as trimStart() and trimEnd() for single-sided trimming, 8) Critical for consistent string comparison and processing.