Use flatMap to map over an array and flatten the result array in one go! ... Step 1: map const nestedArray = names.map((name, index) => [name, index]); ...
確定! 回上一頁