JavaScript test
10.9K subscribers
3.02K photos
5 videos
3.96K links
Проверка своих знаний по языку JavaScript.

Ссылка: @Portal_v_IT

Сотрудничество: @oleginc, @tatiana_inc

Канал на бирже: telega.in/c/js_test

РКН: clck.ru/3KHeYk
Download Telegram
❗️Что будет на выходе:

class Counter {
constructor(max) {
this.max = max;
}

*[Symbol.iterator]() {
let current = 0;
while (current < this.max) {
yield current++;
}
}
}

const counter = new Counter(3);
const result = [...counter, ...counter];
console.log(result);

Ответ: [0, 1, 2, 0, 1, 2]

JavaScript test | #JavaScript
Please open Telegram to view this post
VIEW IN TELEGRAM