Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

javascript append list to list

a.push(...b);

var a = [1,2,3];
var b = [4,5,6];
a.push(...b); // [1,2,3,4,5,6]

// The .push method can take multiple arguments.
// You can use the spread operator (...) to pass all
// the elements of the second array as arguments to .push
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #javascript #append #list #list
ADD COMMENT
Topic
Name
2+5 =