JavaScript Remove Spaces
by Prabakaran[ Edit ] 2012-08-30 17:47:14
<html>
<h2>JavaScript Remove Spaces</h2>
<script language="javascript" type="text/javascript">
var string="All glitters are not gold";
var newString=string.split(' ').join('');
document.write("The original string is = "+string+"<br>");
document.write("After removing the spaces, the string becomes = "+newString);
</script>
</html>