-
Trim in JavaScript
Source code :
Download
var str = " Hello World! "; alert(str.trim());
Output :
Hello World!
Algorithm :
Initialize a variable with string values contains white space
Use the keyword
trim
to remove the white space
Print the result
Output :
Comments :
Random Picks
Multiple Inheritance in Python
String Comparison in Python
Random Number Generator in C#
Swapping two numbers without using third variable in Python
Converting List to string in Python
Multi-Dimensional Array in PHP
Validate Email Address using Regex in Python
Formatting Date in PHP
Linear Search in Python
Usage of single & double quotes in PHP
Comments :