/**
* Created by Ashish Patel
* Copyright © 2018 ashish.me
* ashishsushilpatel@gmail.com
*/
function frankenSplice(arr1, arr2, n) {
const newArr = [...arr2];
newArr.splice(n,0,...arr1)
return newArr;
}
frankenSplice([1, 2, 3], [4, 5, 6], 1);
Created 2019-11-24T04:53:20+05:30 · Edit