JavaScript
32K subscribers
1.03K photos
10 videos
33 files
714 links
A resourceful newsletter featuring the latest and most important news, articles, books and updates in the world of #javascript πŸš€ Don't miss our Quizzes!

Let's chat: @nairihar
Download Telegram
πŸ‘ A Flowing WebGL Gradient, Deconstructed

Even if you don’t want to render a neat plasma-style effect on the Web, this is a wonderfully deep exploration of the math and technology behind doing so using simple GLSL code that could be easily understood by any JavaScript developer.

Alex Harri
Please open Telegram to view this post
VIEW IN TELEGRAM
❀3πŸ‘2🀣2
CHALLENGE

const team = {
members: ['Alice', 'Bob', 'Charlie'],
[Symbol.iterator]: function*() {
let index = 0;
while(index < this.members.length) {
yield this.members[index++].toUpperCase();
}
}
};

const result = [];
for (const member of team) {
result.push(member);
}

console.log(result.join('-'));
πŸ‘4
πŸ‘9❀2πŸ”₯2
Please open Telegram to view this post
VIEW IN TELEGRAM
1❀10πŸ‘2πŸ”₯2
CHALLENGE

const user = {
profile: {
name: 'Alice',
settings: {
notifications: {
email: true,
sms: false
}
}
},
getPreference(type) {
return this.profile?.settings?.notifications?.[type] ?? 'not configured';
}
};

const admin = {
profile: {
name: 'Admin',
settings: null
},
getPreference: user.getPreference
};

console.log(admin.getPreference('email'));
πŸ‘4❀2
πŸ€”10πŸ‘9❀1
Please open Telegram to view this post
VIEW IN TELEGRAM
πŸ‘6❀5πŸ”₯2
CHALLENGE

const companies = [
{ name: 'TechCorp', founded: 2010 },
{ name: 'DataSystems', founded: 2015 },
{ name: 'WebSolutions', founded: 2008 }
];

const activeClients = new WeakSet();

activeClients.add(companies[0]);
activeClients.add(companies[2]);

companies.pop();

const result = [
activeClients.has(companies[0]),
activeClients.has(companies[1]),
typeof activeClients.size
];

console.log(result);
❀4πŸ‘1πŸ€”1
✌️ Love/Hate: Upgrading to Web2.5 with Local-First

Kyle Simpson - dotJS 2025
Please open Telegram to view this post
VIEW IN TELEGRAM
πŸ‘3❀2πŸ€”2
CHALLENGE

function processConfig(config) {
const defaults = {
timeout: 1000,
retries: 3,
enabled: false,
count: 0
};

const settings = {
...defaults,
...config
};

const effectiveTimeout = settings.timeout ?? 500;
const effectiveRetries = settings.retries ?? 1;
const effectiveEnabled = settings.enabled ?? true;
const effectiveCount = settings.count ?? 5;

console.log([effectiveTimeout, effectiveRetries, effectiveEnabled, effectiveCount]);
}

processConfig({ timeout: null, retries: 0, enabled: undefined });
πŸ‘5πŸ€”1
πŸ”₯7❀5πŸ‘1πŸ€”1
Please open Telegram to view this post
VIEW IN TELEGRAM
πŸ‘5πŸ”₯3❀2
CHALLENGE

console.log('Start');

setTimeout(() => {
console.log('Timeout 1');
}, 0);

Promise.resolve().then(() => {
console.log('Promise 1');
}).then(() => {
console.log('Promise 2');
});

setTimeout(() => {
console.log('Timeout 2');
}, 0);

console.log('End');
❀4
✌️ You Don't Know JS Yet: The Unbooks

This ~420pg ebook is a collection of all 4 remaining "unbooks" of the 2nd edition of "You Don't Know JS Yet" book series.

Kyle Simpson
Please open Telegram to view this post
VIEW IN TELEGRAM
1πŸ‘10❀4πŸ”₯4πŸ€”1
CHALLENGE

const a = 9007199254740991n;
const b = 2n;

function performCalculation() {
const c = a + 1n;
const d = c / b;
const e = d * 2n - 1n;

const result = Number(e) === Number(a);
console.log(result);
}

performCalculation();
πŸ‘7
πŸ‘11πŸ€”6❀4
CHALLENGE


const obj = {
[Symbol('a')]: 'hidden',
a: 'visible',
[Symbol.for('b')]: 'registered',
b: 123
};

const symbol1 = Symbol.for('b');
const symbol2 = Symbol.for('b');

console.log(obj.a + ', ' +
obj[Symbol('a')] + ', ' +
obj[symbol1] + ', ' +
(symbol1 === symbol2));
❀2πŸ”₯2πŸ‘1
πŸ‘ p5.js 2.0: The JavaScript Library for Creative Coding

A popular Processing-inspired creative coding library that makes it easy to create interactive, visual experiences (examples). v2.0 improves its font support, adds more ways to draw and manipulate text, adds a way to write shaders in JavaScript, and much more. p5.js 2.0: You Are Here has more details on the release and where the project is headed next.

p5.js Team
Please open Telegram to view this post
VIEW IN TELEGRAM
πŸ‘7πŸ”₯2❀1