what does trim method do?

Average Rating
0 out of 5 stars. 0 votes.

what does trim method do?

“Remove whitespace from both sides of a string:example:var str = “” Hello World! “”;alert(str.trim());alert box will say: Hello World!”