bradxr
8/4/2018 - 1:57 PM

Append to Array

Add data to the end of an array

// declare array
let arr = [1, 2, 3];

// append to array
arr.push(4);

console.log(arr);   // [1, 2, 3, 4]