const map = new Map();
const key1 = {};
const key2 = key1;
map.set(key1, "Value for key1");
map.set(key2, "Value for key2");
console.log(map.get({}));
console.log(map.get(key1));
20 Oct, 03:21
const map = new Map();
const key1 = {};
const key2 = key1;
map.set(key1, "Value for key1");
map.set(key2, "Value for key2");
console.log(map.get({}));
console.log(map.get(key1));
17 Oct, 08:49
function* gen() {
yield *[1,1];
yield 2;
yield 3;
}
const generator = gen();
console.log(generator.next().value);
console.log(generator.next().value);
for (const value of generator) {
console.log(value);
}
09 Oct, 05:13
02 Oct, 12:08
17 Sep, 03:16