Answers for "js push to array site:stackoverflow.com"

0

js push to array site:stackoverflow.com

// initialize array
let arr = ['Hi', 'Hello', 'Bonjour'];
let arr2 = new Array('Hi', 'Hello', 'Bonjour');

// append new value to the array
arr.push("Hola");
arr2.push("Hola");
Posted by: Guest on October-15-2020

Code answers related to "Javascript"

Browse Popular Code Answers by Language