Const arr1 = [a, b, c, d,] const arr2 = [e, f, g, h,] arr3 =______ can u help me merge arr1 and 2 to make arr3 from a-h | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Const arr1 = [a, b, c, d,] const arr2 = [e, f, g, h,] arr3 =______ can u help me merge arr1 and 2 to make arr3 from a-h

Can you help me make arr3 = [a, b, c, d, e, f, g, h,]

26th Nov 2019, 10:22 AM
Samuel Ikenta
Samuel Ikenta - avatar
1 Answer
+ 1
Since I am unaware about what language you're using, There are two ways to do it with any language, One is using pre defined functions and other is writing your own function. Now pre defined functions are already defined in language you simply need to call them and use them But if you want to write your own function the most basic way is to loop over both arrays and store their elements one by one in third array.
26th Nov 2019, 10:59 AM
Raj Chhatrala
Raj Chhatrala - avatar