JavaScript
32.1K subscribers
1.06K photos
10 videos
33 files
737 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
Love it!πŸ”₯
Please open Telegram to view this post
VIEW IN TELEGRAM
85🀣19❀10🀩8πŸ‘7πŸ€”1
❓ CHALLENGE

async function complexAsyncFunction() {
const promise1 = new Promise(resolve => setTimeout(() => resolve(10), 1000));
const promise2 = new Promise(resolve => setTimeout(() => resolve(20), 500));

const result = await Promise.race([promise1, promise2]);

console.log(result);
}

complexAsyncFunction();
Please open Telegram to view this post
VIEW IN TELEGRAM
11❀4πŸ‘2
❀14πŸ‘5🀩4
πŸ€” The AHA Stack: Another Way to Build Modern Webapps

The AHA Stack is a full-stack webapp approach that brings together Astro, htmx, and Alpine.js, and where you send HTML over the wire. This is a fantastic showcase site that sells the idea well, complete with explanations and examples.

FLAVIO COPES
Please open Telegram to view this post
VIEW IN TELEGRAM
πŸ‘8❀6🀣5🀩1
❓ CHALLENGE

const array = [
{ name: 'John', score: 80 },
{ name: 'Jane', score: 95 },
{ name: 'Doe', score: 88 },
];

const result = array.every(obj => obj.score >= 80);

console.log(result);
Please open Telegram to view this post
VIEW IN TELEGRAM
❀10πŸ‘5πŸ€”3
❀19πŸ‘6🀩53🀣2
☺️hehe
Please open Telegram to view this post
VIEW IN TELEGRAM
🀣60❀4πŸ‘4πŸ€”2
❓ CHALLENGE

const array = [
{ name: 'Alice', age: 25 },
{ name: 'Bob', age: 30 },
{ name: 'Charlie', age: 22 },
];

const result = array.find(obj => obj.age === 30);

console.log(result);
Please open Telegram to view this post
VIEW IN TELEGRAM
πŸ‘7❀4
🀣23πŸ‘87🀩6❀1
🀩 Heat.js: A Heat Map Visualization Library

It has no dependencies, and is small, responsive, and themeable. GitHub repo.

WILLIAM TROUP
Please open Telegram to view this post
VIEW IN TELEGRAM
14πŸ‘10❀3🀩3
❓ CHALLENGE

function asyncSum(arr) {
return arr.reduce(async (acc, num) => (await acc) + num, Promise.resolve(0));
}

async function computeTotal() {
const result = await asyncSum([1, 2, 3, 4, 5]);
console.log(result);
}

computeTotal();
Please open Telegram to view this post
VIEW IN TELEGRAM
6πŸ‘1
10πŸ€”8πŸ‘2🀩2❀1
πŸ‘€ Alpine, HTMX, Astro Stack Wordle App With Full Source!

Popular dev YouTuber Jack demonstrates building a Wordle clone with a modern Alpine, HTMX and Astro-based stack. Or you can go straight to the code, if you prefer.

JACK HERRINGTON
Please open Telegram to view this post
VIEW IN TELEGRAM
6❀2πŸ‘2🀩2
Which mobile platform do you use?
Anonymous Poll
77%
Android
19%
IOS
4%
Other
πŸ‘6πŸ€”6🀣64❀2
❓ CHALLENGE

const matrix = [
[1, 2, 3],
[4, 5, 6],
[7, 8, 9],
];

async function complexMatrixOperation(matrix) {
const result = await Promise.all(matrix.map(async row => {
return await Promise.all(row.map(async num => {
if (num % 2 === 0) {
return await new Promise(resolve => setTimeout(() => resolve(num * 3), 200));
} else {
return await new Promise(resolve => setTimeout(() => resolve(num * 2), 100));
}
}));
}));

console.log(result);
}

complexMatrixOperation(matrix);
Please open Telegram to view this post
VIEW IN TELEGRAM
❀13πŸ‘6πŸ€”5🀩55
β˜„οΈβœŒοΈ QuickJS: The Small, Embeddable JavaScript Engine

Several years ago, Fabrice Bellard, the genius behind FFMPEG and JSLinux, built a tiny and complete JavaScript engine in C. It now supports ES2023 and its latest release adds top-level await in modules and its REPL, as well as support for some cutting edge JS features (changelog).

FABRICE BELLARD
Please open Telegram to view this post
VIEW IN TELEGRAM
πŸ‘9❀44🀩1
❓ CHALLENGE

async function asyncQuiz() {
console.log("Start");

const promise1 = new Promise((resolve) => {
setTimeout(() => resolve("Promise 1"), 1000);
});

const promise2 = new Promise((resolve) => {
setTimeout(() => resolve("Promise 2"), 500);
});

console.log(await promise1);
console.log(await promise2);

console.log("End");
}

asyncQuiz();
Please open Telegram to view this post
VIEW IN TELEGRAM
πŸ‘2
✌️🍊 Jint 3.0: A JavaScript Interpreter for .NET

Run JavaScript within a .NET app and expose .NET objects and functions to JavaScript code. v3 arrives after seven years of work and is the most standards-compliant JS engine running entirely within .NET.

SÉBASTIEN ROS
Please open Telegram to view this post
VIEW IN TELEGRAM
πŸ‘8❀41