|
|
|
| String Length function in JavaScriptLength of a string can be calculated by using JavaScript length function. Here is an example of how to get length of a string.
var my_str="Hello world!"
document.write(my_str.length)
The above string will give a out put of 12. Note that the command will count back and forward blank space also.
Found anything wrong or wants to improve the code by adding more features? Post your short comment here or use the Forum
| |
| | | Nibedita Sahu | 18-01-2011 |
|---|
| How to remove blank spaces between two characters using javascript |
|
|
|
|
|
|