I've read this question about javascript trim, with a regex answer.
Then I expect trim to remove the inner space between Hello and World.
function myFunction() {
alert("Hello World ".trim());
}
EDITED
Why I expected that!?
Nonsense! Obviously trim doesn't remove inner spaces!, only leading and trailing ones, that's how trim works, then this was a very wrong question, my apologies.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…