Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

javascript addall

const a = [1, 2, 3];
const b = ['foo', 'bar'];
const c = new Set(['x', 'x', 'y', 'x']);
a.push(...b, ...c);
console.log(a); // Array [ 1, 2, 3, "foo", "bar", "x", "y" ]
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #javascript #addall
ADD COMMENT
Topic
Name
1+9 =