Answers for "how to append data to an array in javascript"

49

javascript append element to array

var colors= ["red","blue"];
	colors.push("yellow");
Posted by: Guest on October-29-2019
4

javascript append array to array

const array1 = ['a', 'b', 'c'];
const array2 = ['d', 'e', 'f'];
const array3 = array1.concat(array2);
Posted by: Guest on September-18-2020

Code answers related to "how to append data to an array in javascript"

Code answers related to "TypeScript"

Browse Popular Code Answers by Language