JavaScript
32.2K subscribers
1.08K photos
10 videos
33 files
757 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
πŸ‘€ The Performance Inequality Gap in 2026

Esteemed browser and Web standards expert Alex Russell looks at the state of client-side Web performance, what sort of bandwidth you should be taking into account, what devices people are using, and warns against ever-growing JavaScript bundle sizes. A lot of data here.

Alex Russell
Please open Telegram to view this post
VIEW IN TELEGRAM
πŸ‘5❀1πŸ€”1
CHALLENGE

class SimpleObservable {
constructor(subscribeFn) {
this.subscribeFn = subscribeFn;
}

subscribe(observer) {
return this.subscribeFn(observer);
}
}

const obs = new SimpleObservable(observer => {
observer.next('first');
observer.next('second');
observer.complete();
});

const results = [];
obs.subscribe({
next: val => results.push(val),
complete: () => results.push('done')
});

console.log(results.join('-'));
❀4πŸ‘1πŸ€”1
πŸ—“ FullCalendar: A Full Sized JavaScript Calendar Control

Get a Google Calendar-style experience in your own apps. Has connectors for React, Vue and Angular, but can be used with plain JavaScript too. The base version is MIT licensed, but there’s a commercial version too with extra features.

Adam Shaw
Please open Telegram to view this post
VIEW IN TELEGRAM
❀10🀩1
CHALLENGE

const arr = [1, 2, 3];
const obj = { valueOf: () => 4, toString: () => '5' };
const result1 = arr + obj;
const result2 = +obj;
const result3 = String(obj);
const result4 = obj == 4;
const result5 = obj === 4;
console.log(`${result1}|${result2}|${result3}|${result4}|${result5}`);
const weird = [] + [] + 'hello';
const weirder = [] + {} + [];
const weirdest = {} + [] + {};
console.log(`${weird}|${weirder}|${weirdest}`);
const final = !!'0' + !!'' + !!null + !!undefined;
console.log(final);
πŸ₯Ά TSDiagram: Diagrams as Code with TypeScript

Draft diagrams quickly with TypeScript. Define your data models through top-level type aliases and interfaces and it automatically lays out the nodes in an efficient way. GitHub repo.

Andrei Neculaesei
Please open Telegram to view this post
VIEW IN TELEGRAM
❀8πŸ‘1
CHALLENGE

const data = '{"users": [{"name": "Sarah", "age": 25}, {"name": "Mike", "age": null}]}';

try {
const parsed = JSON.parse(data);
const result = parsed.users.map(user => {
return user.age ?? 'unknown';
});
console.log(result.join(' - '));
} catch (error) {
console.log('Parse error occurred');
}

const invalidJson = '{"name": "John", age: 30}';
try {
JSON.parse(invalidJson);
console.log('Success');
} catch {
console.log('Invalid');
}
❀9
πŸ‘7πŸ€”2❀1
CHALLENGE

class Logger {
log(msg) {
return `[LOG]: ${msg}`;
}
}

class Formatter {
format(text) {
return text.toUpperCase();
}
}

class Service {
constructor(logger, formatter) {
this.logger = logger;
this.formatter = formatter;
}

process(data) {
const formatted = this.formatter.format(data);
return this.logger.log(formatted);
}
}

const service = new Service(new Logger(), new Formatter());
console.log(service.process('hello world'));