JavaScript has a set of mutator functions that allow you to modify the contents of an array without referencing the individual elements.To add to to myArray we us the push() method
To add to to myArray we us the push() method
(10)
myArray.push(10)
There are two mutator functions for adding elements to an array: push() and unshift(). The push() function adds an element to the end of an array:
var nums = [1,2,3,4,5]; print(nums); // 1,2,3,4,5 nums.push(6);
print(nums); // 1,2,3,4,5,6
var nums = [1,2,3,4,5]; print(nums); // 1,2,3,4,5 nums[nums.length] = 6; print(nums); // 1,2,3,4,5,6
Learn more about arrays here:
https://brainly.com/question/24275089