Код: Выделить всё
function * f() {
for (c of [12, 34, 56]) {
yield c;
}
};
t = new Uint8Array(f());
Код: Выделить всё
t2 = new Uint8Array(function *() {
for (c of [12, 34, 56]) {
yield c;
}
})
Подробнее здесь: https://stackoverflow.com/questions/798 ... -generator