• trim()
    • Description: Removes whitespace from both ends of a string.

    • Example:

      let str = '   Hello, World!   ';
      console.log(str.trim()); // Output: 'Hello, World!'