Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

javascript merge two sorted arrays

let mergedArr = [...arr1, ...arr2];
return mergedArr.sort((a, b) => a-b);
 
PREVIOUS NEXT
Tagged: #javascript #merge #sorted #arrays
ADD COMMENT
Topic
Name
4+5 =