Trim() using strings in Javascript
Trim() using strings in Javascript
<!DOCTYPE html>
<html>
<head>
<title>Test page</title>
<script type="text/javascript">
//trim is used to remove unwanted spaces from the string
var a = " HEY !! THIS IS THE TASK";
var b =a.trim();
alert(b);
</script>
</head>
<body>
<h1></h1>
</body>
</html>
Comments
Post a Comment
I WOULD APPRECIATE IF YOU LEAVE A COMMENT OR YOUR FEEDBACK HERE !!!