The JavaScript push method can be used to add elements to an array. Any values provided to the push function are appended to the end of the array.
//Adds 5 at the end of the array
var aryTest = [1,2,3,4];
aryTest.push(5);
document.write(aryTest);
Related Articles:
JavaScript unshift Method – Adding to an Array Beginning
Filed under: Internet, JavaScript, Programming, Software, Web | Leave a Comment »