JavaScript
32K subscribers
1.03K photos
9 videos
33 files
714 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
What is the output?
Anonymous Quiz
55%
5 10
11%
Error
15%
10 10
18%
undefined 10
🀣42πŸ€”18πŸ‘15πŸ”₯5❀1
πŸ‘€ Schedule-X 2: A Modern Event Calendar Component

Available in the form of React/Preact, Vue, Svelte, Angular, or plain JS components. Open source but with a premium version with extra features. GitHub repo.

Tom Γ–sterlund
Please open Telegram to view this post
VIEW IN TELEGRAM
πŸ”₯6πŸ‘5❀2
CHALLENGE ❓

const original = Object.freeze({ a: [1, 2, 3] });
const copy = { ...original };

copy.a.push(4);

console.log(original.a);
console.log(copy.a);
Please open Telegram to view this post
VIEW IN TELEGRAM
πŸ”₯5πŸ‘1
πŸ€”23πŸ”₯11πŸ‘6❀4🀣2🀩1
✌️ Don't Sleep on AbortController

AbortController is a broadly available mechanism for, originally, aborting Web requests on demand, but you can use it for a lot more than that (or β€˜anything!’, as Artem explains).

Artem Zakharchenko
Please open Telegram to view this post
VIEW IN TELEGRAM
πŸ‘6❀3πŸ”₯1
CHALLENGE ❓

const promise = new Promise((resolve) => {
console.log('Promise started');
setTimeout(() => {
resolve('Promise resolved');
}, 100);
});

promise.then((result) => {
console.log(result);
});

console.log('End of script');
Please open Telegram to view this post
VIEW IN TELEGRAM
πŸ‘5
🀟 ¡Express / Ultimate Express: Like Express, But Faster?

It’s not Express, but a reimplementation of Express’s functionality with API compatibility. Based on Β΅WebSockets, and with an optimized router, it boasts faster performance than regular Express, but needs some C++ magic to make it happen.

dimden
Please open Telegram to view this post
VIEW IN TELEGRAM
πŸ”₯3πŸ‘2❀1
CHALLENGE ❓

const obj = {
value: 100,
method: function() {
const inner = function() {
console.log(this.value);
};
inner();
}
};

obj.method();
Please open Telegram to view this post
VIEW IN TELEGRAM
πŸ€”10πŸ‘6
What is the output?
Anonymous Quiz
58%
100
32%
undefined
8%
Error
2%
0
πŸ€”14πŸ‘8πŸ”₯7❀3
πŸ‘ gradient-string 3.0: Beautiful Color Gradients in Terminal Output

What’s the next step up from colorizing the text output of your Node-powered CLI app? Gradients. v3.0 is rewritten in TypeScript and is a pure ES module.

Boris K
Please open Telegram to view this post
VIEW IN TELEGRAM
πŸ‘5❀3πŸ”₯2🀩1
CHALLENGE ❓

function* generatorFunction() {
yield 1;
yield* function* () {
yield 2;
yield 3;
}();
yield 4;
}

const gen = generatorFunction();
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);
Please open Telegram to view this post
VIEW IN TELEGRAM
πŸ‘5🀩2πŸ”₯1
😒 Why?
Please open Telegram to view this post
VIEW IN TELEGRAM
🀣101πŸ€”8πŸ”₯7🀩4πŸ‘2
CHALLENGE ❓

const arr = [1, 2, 3];
const newArr = arr.map(num => num * 2);

newArr.push(4);
arr[0] = 0;

console.log(arr);
console.log(newArr);
Please open Telegram to view this post
VIEW IN TELEGRAM
πŸ‘5❀3πŸ”₯2
🀣26πŸ‘8❀2
✌️ VoidZero: A Next-Generation Toolchain for JavaScript

Not content to have merely created Vue.js and Vite, JavaScript powerhouse Evan You has unveiled his latest adventure: a $4.6m funded company building an open-source unified development toolchain for the JavaScript ecosystem. With his track record, this is as good an attempt as it gets.

Evan You
Please open Telegram to view this post
VIEW IN TELEGRAM
πŸ‘13🀣3❀2πŸ”₯1
CHALLENGE ❓

async function fetchData() {
console.log('Fetching...');
await new Promise((resolve) => {
setTimeout(() => {
console.log('Data fetched');
resolve();
}, 100);
});
console.log('Process completed');
}

fetchData();
console.log('End of script');
Please open Telegram to view this post
VIEW IN TELEGRAM
❀4
πŸ˜‰Bundling: The Past, Present and Future

A history lesson on bundlers, why they’re used, the problems they solve, the current ecosystem, and a look at the potential future for these tools.

Devon Govett
Please open Telegram to view this post
VIEW IN TELEGRAM
πŸ‘4❀3πŸ”₯2πŸ€”1
CHALLENGE ❓

console.log(1);
setTimeout(() => console.log(2), 0);
Promise.resolve()
.then(() => {
console.log(3);
return Promise.resolve(4);
})
.then(console.log);
console.log(5);
Please open Telegram to view this post
VIEW IN TELEGRAM
πŸ€”9❀6πŸ‘2