This media is not supported in your browser
VIEW IN TELEGRAM
Thank You for 30k! π«‘
Weβve just hit a major milestone: 30,000 subscribers!β‘οΈ
Thank you for being part of our community. Your support and engagement mean the world to us, and weβre excited to keep bringing you the content you love.
Stay tuned for more updates and great things ahead!
P.S. Play the video with the sound on.
@JavaScript Newsletter Team
βοΈ Check out our emoji pack here
π€ Collaboration
Weβve just hit a major milestone: 30,000 subscribers!
Thank you for being part of our community. Your support and engagement mean the world to us, and weβre excited to keep bringing you the content you love.
Stay tuned for more updates and great things ahead!
P.S. Play the video with the sound on.
@JavaScript Newsletter Team
Please open Telegram to view this post
VIEW IN TELEGRAM
2π20β€9π€©5π₯2
CHALLENGE
const items = new WeakSet();
const obj1 = { id: 1 };
const obj2 = { id: 2 };
items.add(obj1);
items.add(obj2);
obj2.value = 'test';
console.log(items.has(obj2));
obj2 = null;
setTimeout(() => {
console.log(items.has(obj2));
}, 0);
π9
What is the output?
Anonymous Quiz
21%
TypeError, TypeError
32%
true, undefined
37%
true, false
10%
true, TypeError
π₯11π€10π4β€2π€£2
Media is too big
VIEW IN TELEGRAM
A quick example of how one can "synchronize" a 3d scene across multiple windows using three.js and localStorage
bgstaal
Please open Telegram to view this post
VIEW IN TELEGRAM
β€19π₯13π€©5π€£2π€1
CHALLENGE
function* range(start, end) {
let current = start;
while (current <= end) {
if (current % 3 === 0) {
current++;
continue;
}
yield current++;
}
}
const gen = range(4, 10);
const result = [...gen];
console.log(result);
π5
What is the output?
Anonymous Quiz
30%
[4, 5, 6, 7, 8, 9, 10]
19%
[4, 5, 6, 7, 8, 10]
10%
[4, 5, 7, 8, 9, 10]
41%
[4, 5, 7, 8, 10]
β€12π₯5π€4π€£2π1
CHALLENGE
async function demo() {
console.log('1');
setTimeout(() => console.log('2'), 0);
Promise.resolve().then(() => {
console.log('3');
setTimeout(() => console.log('4'), 0);
});
await Promise.resolve();
console.log('5');
queueMicrotask(() => console.log('6'));
}
demo();
console.log('7');
π12π₯3β€1
What is the output?
Anonymous Quiz
25%
1, 7, 5, 3, 6, 2, 4
35%
1, 7, 3, 5, 6, 2, 4
28%
1, 3, 5, 6, 7, 2, 4
12%
1, 7, 3, 5, 2, 6, 4
π€7π₯5β€1π1
Four months in the making, TypeScript 5.8 lands with a strong Node focus. You can now use require() for ES modules in the nodenext module, thereβs a new node18 module for developers who want to keep targeting Node 18, and most notably thereβs now an --erasableSyntaxOnly option to ensure no TypeScript-only runtime semantics can be used (ideal if youβre using Nodeβs type stripping features to run TypeScript code directly).
Microsoft
Please open Telegram to view this post
VIEW IN TELEGRAM
π8β€4π₯1
CHALLENGE
const config = {
port: 0,
timeout: null,
retries: '',
cache: false,
debug: undefined
};
const port = config.port ?? 3000;
const timeout = config.timeout ?? 5000;
const retries = config.retries ?? 3;
const cache = config.cache ?? true;
const debug = config.debug ?? false;
console.log([port, timeout, retries, cache, debug]);
π10
What is the output?
Anonymous Quiz
18%
[3000, null, 3, false, false]
33%
[0, 5000, '', false, false]
12%
[0, 5000, '', false, true]
37%
[3000, 5000, 3, true, false]
π₯16π12π€10β€1
A basic template app that uses React 19, Tailwind CSS 4, shadcn/ui, Electron Vite, Biome, and includes a GitHub Actions release workflow.
Dalton Menezes
Please open Telegram to view this post
VIEW IN TELEGRAM
π7β€2π₯2
CHALLENGE
const team = {
captain: { name: 'Jack', age: 35 },
players: ['Bob', 'Alice', 'Mike'],
details: { founded: 2020, league: 'Premier' }
};
const {
captain: { name },
players: [, second],
details: { league: division = 'Amateur' }
} = team;
console.log(`${name}-${second}-${division}`);
π€£11π5β€4
What is the output?
Anonymous Quiz
8%
undefined-Bob-Premier
35%
Jack-undefined-Premier
22%
undefined-Alice-Amateur
34%
Jack-Alice-Premier
π15β€3π₯2π€2
CHALLENGE
const handler = {
get: (target, prop) => {
if (prop in target) {
return target[prop] * 2;
}
return 100;
}
};
const nums = new Proxy({ a: 5, b: 10 }, handler);
console.log(nums.a, nums.b, nums.c);
π₯12
What is the output?
Anonymous Quiz
25%
10 20 undefined
24%
5 10 100
19%
5 10 undefined
32%
10 20 100
π₯7π3β€2
A developer with βa decade awayβ from writing JavaScript returns to find that one thing hasnβt changed: βChoosing the right JavaScript framework is hard, man.β
Allen Pike
Please open Telegram to view this post
VIEW IN TELEGRAM
π9π€©3π₯2π€£1
CHALLENGE
async function fetchData() {
const promise = new Promise(resolve => {
setTimeout(() => resolve('first'), 2000);
});
console.log('start');
const result = await promise;
console.log(result);
console.log('end');
}
fetchData();
const x = 'after';
console.log(x);
β€4π2
What is the output?
Anonymous Quiz
33%
start after first end
22%
after start first end
27%
start first end after
18%
start end first after
β€4π₯4π2