CHALLENGE
const user = {
name: 'John',
greet() {
const getName = () => {
console.log(this.name);
};
getName();
},
farewell: function() {
function getName() {
console.log(this.name);
}
getName();
}
};
user.greet();
user.farewell();
What is the output?
Anonymous Quiz
34%
John undefined
39%
John John
13%
undefined undefined
14%
undefined John
A mature Svelte component library for creating interactive node-based UIs and diagrams. v11 adds the ability to toggle between ‘snap grid’ and freeform modes for manipulating elements. (There’s a live demo at the bottom of the homepage.)
Open Source Labs
Please open Telegram to view this post
VIEW IN TELEGRAM
CHALLENGE
const arr = [1, 2, 3, 4, 5];
const result = arr
.map(x => x * 2)
.filter(x => x > 5)
.reduce((acc, val) => {
return acc + (val % 3 === 0 ? val : 0);
}, 0);
console.log(result);
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
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);
What is the output?
Anonymous Quiz
21%
TypeError, TypeError
32%
true, undefined
38%
true, false
9%
true, TypeError
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
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);
What is the output?
Anonymous Quiz
30%
[4, 5, 6, 7, 8, 9, 10]
17%
[4, 5, 6, 7, 8, 10]
10%
[4, 5, 7, 8, 9, 10]
43%
[4, 5, 7, 8, 10]
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');
What is the output?
Anonymous Quiz
25%
1, 7, 5, 3, 6, 2, 4
38%
1, 7, 3, 5, 6, 2, 4
25%
1, 3, 5, 6, 7, 2, 4
12%
1, 7, 3, 5, 2, 6, 4
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
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]);
What is the output?
Anonymous Quiz
18%
[3000, null, 3, false, false]
31%
[0, 5000, '', false, false]
10%
[0, 5000, '', false, true]
40%
[3000, 5000, 3, true, false]
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
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}`);
What is the output?
Anonymous Quiz
7%
undefined-Bob-Premier
38%
Jack-undefined-Premier
23%
undefined-Alice-Amateur
32%
Jack-Alice-Premier
Please open Telegram to view this post
VIEW IN TELEGRAM