Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

javascript concat two htmlcollection

// convert both to arrays so they have the full complement of Array methods
var array1 = Array.prototype.slice.call(x.getElementsByClassName("one"), 0);
var array2 = Array.prototype.slice.call(x.getElementsByClassName("two"), 0);
var concat_array = array1.concat(array2)
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #javascript #concat #htmlcollection
ADD COMMENT
Topic
Name
1+3 =