How to use JavaScript variable names with strings?

Today I will explain how to use javascript variable names with strings. In last session I explained how to create java script variables Previous Article
Now using variable how we can access the length of the variable; let’s check the below
Example

Now using length property we can compare the string length.let check it below

Here in the string character has position numbered index starts from “ 0”

Since the index starts from zero ,but length value will always be one more then the last index.
Finding specific character using charAt() method .

READ  How to use binary conditions in JavaScript?

Example below

Now we will see how to concatenate two strings in javascript

Example

Thanks for reading this article.

Leave a Reply