Open this example in the interactive library
Source code
console.log(
["ab", "cd"]
.values()
.flatMap((word) => word[Symbol.iterator]())
.toArray(),
);
Sample output
[ 'a', 'b', 'c', 'd' ]

Open this example in the interactive library
console.log(
["ab", "cd"]
.values()
.flatMap((word) => word[Symbol.iterator]())
.toArray(),
);
[ 'a', 'b', 'c', 'd' ]