add string in list in javascript code example
Example 1: how to append in javascript
var list=[1, 2, 3, 4, 5];
list.push(6);
// .push allows you to add a value to the end of a list
Example 2: js add array items to array
var arrayA = [1, 2];
var arrayB = [3, 4];
var newArray = arrayA.concat(arrayB);