how to set array value while pushing code example
Example: javascript array push
let animals = ["dog","cat","tiger"];
animals.pop(); // ["dog","cat"]
animals.push("elephant"); // ["dog","cat","elephant"]
let animals = ["dog","cat","tiger"];
animals.pop(); // ["dog","cat"]
animals.push("elephant"); // ["dog","cat","elephant"]