0 points

javascript - How to append something to an array? - Stack Overflow


dashboard

Sat Aug 15 2020 03:30:32 GMT+0000 (UTC)

Posted by @rdemo #javascript

var arr = [
  "apple",
  "banana",
  "cherry"
];

arr = arr.concat([
  "dragonfruit",
  "elderberry",
  "fig"
]);

console.log(arr);
content_copy Copy

https://stackoverflow.com/questions/351409/how-to-append-something-to-an-array