from http://stackoverflow.com/questions/351409/appending-to-array
The commands are
// initialize array
var arr = [
"Hi",
"Hello",
"Bonjour"
];
// append new value to the array
arr.push("Hola");
// display all values
for (var i = 0; i < arr.length; i++) {
alert(arr[i]);
}
No comments:
Post a Comment