Answers for "append data array javascript"

187

append data array javascript

var colors=["red","white"];
colors.push("blue");//append 'blue' to colors
Posted by: Guest on July-22-2019
0

prepend to js array

var a = [1, 2, 3, 4];
a.unshift(0);
a; // => [0, 1, 2, 3, 4]
Posted by: Guest on August-23-2020

Code answers related to "Javascript"

Browse Popular Code Answers by Language