ExamGecko
Question list
Search
Search

List of questions

Search

Related questions











Question 160 - Certified JavaScript Developer I discussion

Report
Export

myArraym can have one level, two levels, or more levels.

Which statement flattens myArray when it can be arbitrarily nested?

A.
myArray. reduce ((prev, curr) => prev.concat(curr) [ ]);
Answers
A.
myArray. reduce ((prev, curr) => prev.concat(curr) [ ]);
B.
myArray. join (","). split (",");
Answers
B.
myArray. join (","). split (",");
C.
[ ] .concat {. . .myArray) ;
Answers
C.
[ ] .concat {. . .myArray) ;
D.
myArray.flat(Infinity);
Answers
D.
myArray.flat(Infinity);
Suggested answer: A
asked 23/09/2024
Anu V
42 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first