In this Tutorial we want to describe you a code that help you in understanding JavaScript array for string, The code depicts that on loading a page invoke a function display ( ). The function includes an array variable that is used to instantiate an array. The array object hold the different element specified by array index from [0] -[5].The for loop execute and run the script till the length i is less than the length of an array. The document. write print the element of the array that it hold.
Method used-
1)array.splice(1,2) - This method remove and insert an element of array. This method remove the element from an array index [1] and [2].
Finally the document. write print the list of element that an array object hold after delete an element from the element of an array.
function.html
|
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.
Ask Questions? Discuss: Javascript array for string
Post your Comment