Home | Mailing List | Blog | Tutorial Videos

Using Array#flat

Consider the following nested array. What will get logged?

const array = [1,[2,[3,[4,[5,[6,[7],8],9],10]]],12];
const result = array.flat(5);
console.log(result);

Select one: