Telegram Web
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();
🟠 Svelvet 11: Build Node-Based UIs with Svelte

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);
What is the output?
Anonymous Quiz
13%
9
64%
6
15%
12
8%
18
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
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);
Media is too big
VIEW IN TELEGRAM
😱 Multiple Window 3D Scene using Three.js

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);
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');
🥶 Announcing TypeScript 5.8

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]);
👍 Electron App Boilerplate with Modern Dependencies

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}`);
Please open Telegram to view this post
VIEW IN TELEGRAM
2025/03/09 05:05:08
Back to Top
HTML Embed Code: