Q. Which function is used to remove white spaces from both ends of a string?
β
Correct Answer: (A)
trim()
Explanation: trim() removes whitespace from both ends of a string.