CHALLENGE
const numbers = [1, 2, 3, 4, 5, 6];
const result = numbers
.map(x => x * 2)
.filter(x => x > 6)
.reduce((acc, x) => {
console.log(`Processing ${x}, acc: ${acc}`);
return acc + x;
}, 0);
console.log(`Final result: ${result}`);
👍7❤3
What is the output?
Anonymous Quiz
17%
Processing 10, acc: 8 Processing 12, acc: 18 Final result: 30
25%
Processing 8, acc: 0 Processing 10, acc: 8 Final result: 18
15%
Processing 4, acc: 0 Processing 5, acc: 4 Processing 6, acc: 9 Final result: 15
43%
Processing 8, acc: 0 Processing 10, acc: 8 Processing 12, acc: 18 Final result: 30
👍6❤5
A year ago, developer Dimitri Mitropoulos got Doom to run inside TypeScript's type system. Now, he's joined Dillon Mulroy (above) 😉 to walk through the entirety of how it works (in a mere six hours!)
Please open Telegram to view this post
VIEW IN TELEGRAM
🔥5❤4👍3🤣3
CHALLENGE
const obj = {
value: 42,
[Symbol.toPrimitive](hint) {
if (hint === 'number') return this.value * 2;
if (hint === 'string') return `Value: ${this.value}`;
return this.value + 10;
}
};
console.log(+obj);
console.log(`${obj}`);
console.log(obj + 5);
console.log(Number(obj));🔥3❤2👍2
What is the output?
Anonymous Quiz
37%
84 Value: 42 57 84
41%
84 Value: 42 52 84
14%
42 42 47 84
8%
42 Value: 42 47 42
❤2👍1🤔1
• require(esm) now stable and a new CLI flag:
--require-module• Module compile cache now stable
•
http.setGlobalProxyFromEnv() added• Multiple APIs promoted to stable (heapsnapshot, build snapshot, `v8.queryObjects`)
• Root CAs updated to NSS 3.117
• Several semver-minor improvements across events, module, stream, process, util
Rafael Gonzaga
Please open Telegram to view this post
VIEW IN TELEGRAM
🔥6👍4❤2
CHALLENGE
function mysteryFunction() {
console.log(x);
console.log(y);
console.log(z);
var x = 'declared';
let y = 'block-scoped';
const z = 'constant';
console.log(x);
console.log(y);
console.log(z);
}
mysteryFunction();❤6👍1
Aspire is a Microsoft framework for orchestrating the development and deployment of distributed applications. Originally just targeting .NET, the new Aspire 13 makes JavaScript a first-class citizen, so you can now run Vite, Node.js, and full-stack JS apps with service discovery, built-in telemetry, and production-ready containers.
Microsoft
Please open Telegram to view this post
VIEW IN TELEGRAM
❤6🔥5👍3
CHALLENGE
function Vehicle(type) {
this.type = type;
this.wheels = 4;
}
Vehicle.prototype.getInfo = function() {
return `${this.type} with ${this.wheels} wheels`;
};
const car = new Vehicle('sedan');
const bike = Vehicle('motorcycle');
console.log(car.getInfo());
console.log(typeof bike);
console.log(bike?.type || 'undefined');👍6❤4🔥3
On January 14, 2006, John Resig introduced a JavaScript library called jQuery at BarCamp in New York City....
Timmy Willison
Please open Telegram to view this post
VIEW IN TELEGRAM
🔥17❤12👍10🤣1
CHALLENGE
function* innerGenerator() {
yield 1;
yield 2;
return 'inner-done';
}
function* outerGenerator() {
yield 'start';
const result = yield* innerGenerator();
yield result;
yield 'end';
}
const gen = outerGenerator();
console.log(gen.next().value);
console.log(gen.next().value);
console.log(gen.next().value);
console.log(gen.next().value);
console.log(gen.next().value);❤11🔥5🤣1
What is the output?
Anonymous Quiz
18%
start 1 inner-done end undefined
47%
start 1 2 inner-done end
20%
start 1 2 undefined end
15%
start undefined undefined inner-done end
❤2👍2🤣1
Whether you agree or not, Ryan Dahl, the original creator of both Node.js and Deno, drew a lot of attention for a post on X (above) where he shared a thought on the shifting roles of modern software engineers in an agentic world.
❤6👍5🔥4🤣1
CHALLENGE
function processData() {
const results = [];
for (let i = 0; i < 3; i++) {
const multiplier = i + 1;
setTimeout(() => {
results.push(i * multiplier);
}, 0);
}
setTimeout(() => {
console.log(results.join(','));
}, 10);
}
processData();❤4👍2🔥2
🔥5👍3❤1
Got two similar objects or arrays and want to see the underlying differences? Superdiff has been around a while, but recent updates boost performance, add support for streamed input and using a worker for more efficient diffing in a background thread. The project now has a handy documentation site too.
antoine
Please open Telegram to view this post
VIEW IN TELEGRAM
❤9🔥4👍3
CHALLENGE
class Calculator {
constructor(value) {
this.value = value;
}
add(num) {
this.value += num;
return this;
}
multiply(num) {
this.value *= num;
return this;
}
}
const calc = new Calculator(5);
const addMethod = calc.add;
const result = addMethod.call(calc, 3).multiply(2);
console.log(result.value);🔥8❤6👍4