Exam4Training

which two statements results in the array [1,2,3,4,5]?

Refer to the code below

let inArray = [[1,2],[3,4,5]];

which two statements results in the array [1,2,3,4,5]? choose 2 answer
A . [ ].concat(…inArray);
B. [ ].concat.apply(inArray,[ ]);
C. [ ].concat([…inArray])
D. [ ].concat.apply([ ],inArray);

Answer: A,D

Exit mobile version