JavaScript
32.2K subscribers
1.08K photos
10 videos
33 files
763 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
πŸ‘€ Many Devs blame Vercel for Next.js-related React security vulnerabilities.

Because making new frameworks like Next.js is relatively easy nowadays, someone with enough social influence can literally destroy Vercel's business by popularising some other framework, which, by the way, would have nearly identical problems anyway, because this was mostly the React problem itself.

Tigran Bayburtsyan
Please open Telegram to view this post
VIEW IN TELEGRAM
❀6πŸ€”2
CHALLENGE

const obj = { a: 1, b: 2, c: 3 };
Object.defineProperty(obj, 'd', {
value: 4,
enumerable: false
});

const entries = Object.entries(obj);
const keys = Object.keys(obj);
const values = Object.values(obj);

console.log(entries.length + keys.length + values.length);
❀6🀩1
What is the output?
Anonymous Quiz
19%
6
41%
12
28%
9
12%
10
πŸ‘6
πŸ‘€ Useful Patterns for Building HTML Tools

In many situations, you don’t need a full-on framework to build useful tools; just HTML, JavaScript and CSS in a single file will do the job fine. Simon’s become a bit of an expert by rolling out many such tools using LLMs, and shares his process and practices here. More please!

Simon Willison
Please open Telegram to view this post
VIEW IN TELEGRAM
❀7πŸ‘2
CHALLENGE

function Vehicle(type) {
this.type = type;
}

Vehicle.prototype.wheels = 4;
Vehicle.prototype.getInfo = function() {
return `${this.type}: ${this.wheels}`;
};

const car = new Vehicle('Car');
const bike = Object.create(car);
bike.type = 'Bike';
bike.wheels = 2;

console.log(car.getInfo() + ' | ' + bike.getInfo());
❀7
πŸ€” Open Sourcing the Remix Store

The Remix Store is a swag store for the Remix project and its codebase provides a powerful example of how Remix’s own core team builds apps with Remix and Hydrogen.

Brooks Lybrand and the Remix Team
Please open Telegram to view this post
VIEW IN TELEGRAM
❀4πŸ‘1πŸ”₯1
CHALLENGE

const x = null;
const y = undefined;
const z = 0;

const result1 = x ?? 'default';
const result2 = y ?? 'default';
const result3 = z ?? 'default';

const combined = result1 ? result2 ? result3 : 'B' : 'C';

console.log(combined);
❀3πŸ‘1πŸ”₯1
What is the output?
Anonymous Quiz
23%
C
35%
0
34%
default
8%
B
πŸ”₯4❀3πŸ‘3
CHALLENGE

function Vehicle(type) {
this.type = type;
this.wheels = 4;
}

Vehicle.prototype.describe = function() {
return `${this.type} with ${this.wheels} wheels`;
};

const car = new Vehicle('Car');
const bike = Vehicle('Bike');

console.log(car.describe());
console.log(typeof bike);
console.log(globalThis.type);
CHALLENGE

const json = '{"name":"Sarah","age":25,"active":true}';
const obj = JSON.parse(json);

obj.name = "Emma";
obj.age++;

const json2 = JSON.stringify(obj);
const obj2 = JSON.parse(json2);

obj.age = 100;

console.log(obj2.age);
What is the output?
Anonymous Quiz
20%
25
14%
27
34%
100
33%
26
πŸ€”5❀3πŸ”₯2πŸ‘1
CHALLENGE

const multiplier = 3;

function createCounter() {
let count = 0;
const multiplier = 5;

return function() {
count++;
return count * multiplier;
};
}

const counter = createCounter();
console.log(counter());
console.log(counter());
console.log(multiplier);
❀3πŸ”₯1
What is the output?
Anonymous Quiz
15%
3 6 3
60%
5 10 3
15%
5 10 5
10%
3 6 5
❀6πŸ‘3
πŸ’Ž Sponsored

Gold quietly hit a new record in 2025 πŸš€

Some assets move fast, others move steadily, but both say something about how we react to risk.

How well do you read these shifts?

Check yourself by taking a short quiz.
Please open Telegram to view this post
VIEW IN TELEGRAM
🀣6πŸ€”4
CHALLENGE

const x = 0.1 + 0.2;
const y = 0.3;

console.log(x === y);
console.log(x.toFixed(1) === y.toFixed(1));
console.log(+x.toFixed(1) === +y.toFixed(1));

const num = 42;
console.log(num.toString(2));
console.log(parseInt('101010', 2));
CHALLENGE

const x = 5;
const y = 10;

const result = `${x + y}`;
const nested = `Value: ${`${x}` + `${y}`}`;
const expr = `${x}${y}`;

console.log(result);
console.log(nested);
console.log(expr);
console.log(typeof result);
πŸ‘4πŸ€”2🀩1