Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

concat multiple arrays in javascript

const concatArrays = (...arrays) => {
  let concatenatedArray = [];
  for(let i=0; i<arrays.length; i++){
    if(Array.isArray(arrays[i])){
    concatenatedArray.push(...arrays[i]);
  }
  else
  return false;
  }
  return concatenatedArray;
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #concat #multiple #arrays #javascript
ADD COMMENT
Topic
Name
7+4 =