In previous part I just gave an introduction to JavaScript Programming, and also I explained what is a variable in JavaScript. In this part we are going to discuss about JavaScript Strings and JavaScript Arrays.

JavaScript Strings

If you need to concatenate two or more strings, use the + operator.example

Access an element of an array by using its index. For example to access the array element “orange”, use the code below.

strFavorite = strColor(3);

Notes:– The first element in the array always has an index of 0. The last element in an array has an index one less than the size used to declare the array.– You can declare and initialize an array at the same time as shown below.