arr.push i n js code example
Example 1: javascript append element to array
var colors= ["red","blue"];
colors.push("yellow");
Example 2: how to add list in javascript
print(list)
var colors= ["red","blue"];
colors.push("yellow");
print(list)