CHALLENGE
console.log('1');
setTimeout(() => console.log('2'), 0);
Promise.resolve().then(() => console.log('3'));
queueMicrotask(() => console.log('4'));
setTimeout(() => {
console.log('5');
Promise.resolve().then(() => console.log('6'));
}, 0);
console.log('7');โค1
What is the output?
Anonymous Quiz
35%
1 7 3 4 2 5 6
29%
1 7 3 4 5 2 6
23%
1 7 2 3 4 5 6
14%
1 3 4 7 2 5 6
โค6๐1๐ฅ1
Please open Telegram to view this post
VIEW IN TELEGRAM
๐ฅ6
CHALLENGE
const target = { name: 'Sarah', age: 25 };
const handler = {
get(obj, prop) {
if (prop in obj) {
return obj[prop];
}
return `Property '${prop}' not found`;
},
set(obj, prop, value) {
obj[prop] = value.toString().toUpperCase();
return true;
}
};
const proxy = new Proxy(target, handler);
proxy.city = 'boston';
console.log(proxy.name);
console.log(proxy.city);
console.log(proxy.country);What is the output?
Anonymous Quiz
18%
Sarah boston undefined
43%
Sarah boston Property 'country' not found
32%
Sarah BOSTON Property 'country' not found
7%
Sarah BOSTON undefined
โค3๐ฅ2
CHALLENGE
const Flyable = {
fly() { return 'flying'; }
};
const Swimmable = {
swim() { return 'swimming'; }
};
function applyMixins(target, ...mixins) {
mixins.forEach(mixin => {
Object.assign(target.prototype, mixin);
});
}
class Bird {}
class Fish {}
applyMixins(Bird, Flyable, Swimmable);
applyMixins(Fish, Swimmable);
const eagle = new Bird();
const shark = new Fish();
console.log(eagle.swim());
console.log(shark.fly?.() || 'undefined method');โค3๐ฅ1
What is the output?
Anonymous Quiz
50%
swimming undefined method
19%
flying swimming
17%
undefined method swimming
14%
swimming flying
โค4๐ค3๐1๐คฃ1
Iโm a sucker for a big table of data and this is about as big as it gets when it comes to JavaScript engines. See how various engines compare, sort them by performance, or click on an engineโs name to learn more about its development, history, and end users. The projectโs repo also has Dockerfiles for trying each of them out.
Ivan Krasilnikov
Please open Telegram to view this post
VIEW IN TELEGRAM
โค6๐3
- Iterator Sequencing progressed to stage 4.
- Joint Iteration, Iterator Join, and Await dictionary of Promises go stage 2.7.
- The Intl Unit Protocol also reached stage 1 to provide a way to annotate quantities with the units being measured.
- Typed Array Find Within progressed to stage 1. Think a native indexOf-type method for TypedArrays.
Note: Learn more about what the TC39 stages mean here.
Please open Telegram to view this post
VIEW IN TELEGRAM
โค7๐ฅ4๐2
A thirty-minute talk from JSNation earlier this year where TSC member Matteo Collina presented an update on Nodeโs still-growing popularity, release schedule, security, recent performance enhancements, the permissions system, and more.
GitNation
Please open Telegram to view this post
VIEW IN TELEGRAM
โค8๐ฅ2๐1
CHALLENGE
console.log(typeof myFunction);
console.log(typeof myVar);
console.log(typeof myLet);
console.log(typeof myConst);
var myVar = 'hello';
let myLet = 'world';
const myConst = 'test';
function myFunction() {
return 'hoisted';
}
console.log(myFunction());
console.log(myVar);
โค2๐คฃ1
When the author teased a demo of this on X a few weeks ago, I wasnโt sure if it would get released, but here it is. A new way to put together native apps using React and the popular lightweight GUI library Dear ImGui.
Tzvetan Mikov
Please open Telegram to view this post
VIEW IN TELEGRAM
โค3๐1
Please open Telegram to view this post
VIEW IN TELEGRAM
โค1๐1๐ฅ1
Please open Telegram to view this post
VIEW IN TELEGRAM
โค1๐1