CHALLENGE β
const obj = {
value: 100,
method: function() {
const inner = function() {
console.log(this.value);
};
inner();
}
};
obj.method();
Please open Telegram to view this post
VIEW IN TELEGRAM
π€10π6
π€14π8π₯7β€3
Whatβs the next step up from colorizing the text output of your Node-powered CLI app? Gradients. v3.0 is rewritten in TypeScript and is a pure ES module.
Boris K
Please open Telegram to view this post
VIEW IN TELEGRAM
π5β€3π₯2π€©1
CHALLENGE β
function* generatorFunction() {
yield 1;
yield* function* () {
yield 2;
yield 3;
}();
yield 4;
}
const gen = generatorFunction();
console.log(gen.next().value);
console.log(gen.next().value);
console.log(gen.next().value);
console.log(gen.next().value);
console.log(gen.next().value);
Please open Telegram to view this post
VIEW IN TELEGRAM
π5π€©2π₯1
What is the output?
Anonymous Quiz
23%
1, 2, 3, undefined, 4
20%
1, 3, 4, undefined, undefined
13%
1, 2, 3, undefined, undefined
44%
1, 2, 3, 4, undefined
π11β€5π₯1
Please open Telegram to view this post
VIEW IN TELEGRAM
π€£101π€8π₯7π€©4π2
CHALLENGE β
const arr = [1, 2, 3];
const newArr = arr.map(num => num * 2);
newArr.push(4);
arr[0] = 0;
console.log(arr);
console.log(newArr);
Please open Telegram to view this post
VIEW IN TELEGRAM
π5β€3π₯2
What is the output?
Anonymous Quiz
16%
[0, 2, 3], [2, 4, 6]
26%
[1, 2, 3], [2, 4, 6, 4]
9%
[1, 2, 3], [2, 4, 6]
48%
[0, 2, 3], [2, 4, 6, 4]
π€£26π8β€2
Not content to have merely created Vue.js and Vite, JavaScript powerhouse Evan You has unveiled his latest adventure: a $4.6m funded company building an open-source unified development toolchain for the JavaScript ecosystem. With his track record, this is as good an attempt as it gets.
Evan You
Please open Telegram to view this post
VIEW IN TELEGRAM
π13π€£3β€2π₯1
CHALLENGE β
async function fetchData() {
console.log('Fetching...');
await new Promise((resolve) => {
setTimeout(() => {
console.log('Data fetched');
resolve();
}, 100);
});
console.log('Process completed');
}
fetchData();
console.log('End of script');
Please open Telegram to view this post
VIEW IN TELEGRAM
β€4
What is the output?
Anonymous Quiz
15%
Data fetched, Fetching..., End of script, Process completed
41%
Fetching..., End of script, Process completed, Data fetched
20%
Fetching..., Data fetched, End of script, Process completed
23%
Fetching..., End of script, Data fetched, Process completed
π11π₯4β€3
A history lesson on bundlers, why theyβre used, the problems they solve, the current ecosystem, and a look at the potential future for these tools.
Devon Govett
Please open Telegram to view this post
VIEW IN TELEGRAM
π4β€3π₯2π€1
CHALLENGE β
console.log(1);
setTimeout(() => console.log(2), 0);
Promise.resolve()
.then(() => {
console.log(3);
return Promise.resolve(4);
})
.then(console.log);
console.log(5);
Please open Telegram to view this post
VIEW IN TELEGRAM
π€9β€6π2
What is the output?
Anonymous Quiz
15%
1, 5, 3, 2, 4
46%
1, 5, 3, 4, 2
31%
1, 5, 2 ,3, 4
9%
1, 5, 4, 3, 2
β€13π€£6π₯4π2
Please open Telegram to view this post
VIEW IN TELEGRAM
π5π₯3π€£3β€1
CHALLENGE β
console.log('A');
setTimeout(() => console.log('B'), 0);
Promise.resolve().then(() => console.log('C'));
console.log('D');
Please open Telegram to view this post
VIEW IN TELEGRAM
β€5π2
β€10π9π₯1π€£1
Please open Telegram to view this post
VIEW IN TELEGRAM
π€£132π₯5π€2π€©1
CHALLENGE β
setTimeout(() => {
console.log('setTimeout 1');
Promise.resolve().then(() => console.log('Promise 1'));
}, 0);
Promise.resolve().then(() => {
console.log('Promise 2');
setTimeout(() => console.log('setTimeout 2'), 0);
});
console.log('Sync');
Please open Telegram to view this post
VIEW IN TELEGRAM
π13
Please open Telegram to view this post
VIEW IN TELEGRAM
π5β€2π₯2