$ ./guess_the_languageProblem Solving — fill the blank
Problem Solving — fill the blank · easy · #107

What goes in the blank?

// returns the string with leading/trailing spaces removed
function clean(s) {
  return s.____();
}
// clean("  hi  ") -> "hi"

Answer: trim (also accepted: trim, trim())

trim() removes whitespace from both ends of a string.
Play Problem Solving ▸