Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

array.push multiple

const animals = ['pigs', 'goats', 'sheep'];
animals.push('chickens', 'cats', 'dogs');
console.log(animals);
// expected output: Array ["pigs", "goats", "sheep", "chickens", "cats", "dogs"]
Source by developer.mozilla.org #
 
PREVIOUS NEXT
Tagged: #multiple
ADD COMMENT
Topic
Name
7+5 =