JavaScript string object we can use with its different properties and methods to get various string formats and string types. We will discuss with some examples for better understanding.
Let us first declare a new string object like this.
<script type="text/javascript">
my_string= new String("Welcome to plus2net.com");
</script>
Length property to get the length of the string
It gives the total length of the string including blank spaces present in a string.