TGViewer
Channel Public Channel
JavaScript

JavaScript

@javascript

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
Subscribers
31.1K
Photos
1.2K
Videos
10
Links
895

Showing posts older than #2942 · Back to latest

Older Posts 20 shown
Post #2941 3.06K
  • 🔥 5
  • 👍 3
  • ❤ 1
Post #2940 3.32K
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
Post #2939 3.32K
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
Post #2938 3.36K
  • ❤ 2
  • 👍 2
  • 🤣 2
Post #2937 3.33K
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
  • 🤣 1
Post #2936 3.09K
💎 Happy 20th Birthday jQuery!

On January 14, 2006, John Resig introduced a JavaScript library called jQuery at BarCamp in New York City....

Timmy Willison
  • 🔥 18
  • ❤ 12
  • 👍 10
  • 🤣 1
Post #2935 3.22K
  • 👍 5
  • ❤ 2
Post #2934 3.17K
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
  • 👍 6
  • 🔥 3
Post #2933 3.27K
🤟 Node.js Becomes a First-Class Citizen in Microsoft Aspire

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
  • ❤ 6
  • 🔥 5
  • 👍 3
Post #2932 3.15K
  • 👍 6
  • ❤ 3
Post #2931 3.23K
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();
  • ❤ 7
  • 👍 1
Post #2930 3.62K
🤟 Node.js v25.4.0 is out!

• 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
  • 🔥 6
  • 👍 4
  • ❤ 2
Post #2929 3.09K
  • ❤ 2
  • 👍 1
  • 🤔 1
Post #2928 3.33K
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
Post #2924 3.73K
  • 👍 6
  • ❤ 5
Post #2923 3.42K
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
Post #2922 4.07K
✌️ Date is out, Temporal is in

Temporal is the Date system we always wanted in JavaScript. It's extremely close to being available so Mat Marquis thought it would be a good idea to explain exactly what is better about this new JavaScript date system.

Mat “Wilto” Marquis
  • ❤ 9
  • 🔥 4
  • 👍 3
Post #2921 3.64K
  • ❤ 5
  • 👍 4
Older posts →
Threads Profile ViewerView any public Threads profile without an account.Open ThreadLook →Writing with AI? Make it sound human.Metric37 rewrites AI drafts so they read naturally. Free AI detector, 1,500 words free.Try Metric37 →