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