JavaScript
32K subscribers
1.03K photos
10 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
πŸ˜‰ From Node.js to Deno: How It All Began

A brief nine minute documentary exploring the origins of Deno with Ryan Dahl and Bert Belder. A good, quick way to get up to speed with the motivations behind the alternative JavaScript runtime.

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


let funcs = [];

for (var i = 0; i < 3; i++) {
funcs.push(() => i);
}

console.log(funcs[0]());
console.log(funcs[1]());
console.log(funcs[2]());
Please open Telegram to view this post
VIEW IN TELEGRAM
πŸ€”6❀5πŸ‘5πŸ”₯1
What is the output?
Anonymous Quiz
66%
0, 1, 2
12%
0, 0, 0
7%
2, 2, 2
15%
3, 3, 3
πŸ€”28πŸ‘10🀩5❀4πŸ”₯1
πŸ‘ Chokidar 4.0: Efficient Cross-Platform File Watching Library

Wraps around fs.watch / fs.watchFile and normalizes the events received, applies some best practices, and presents an API that works the same across different platforms.

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


const person = {
name: "John",
greet: function() {
const getMessage = () => `Hello, ${this.name}`;
return getMessage();
}
};

console.log(person.greet());
Please open Telegram to view this post
VIEW IN TELEGRAM
πŸ‘8❀2
πŸ‘7πŸ”₯6πŸ€”4❀2
Please open Telegram to view this post
VIEW IN TELEGRAM
🀣13πŸ‘4πŸ”₯3❀1
CHALLENGE ❓


const animal = {
sound: "Generic sound",
makeSound() {
return this.sound;
}
};

const dog = Object.freeze(Object.create(animal));
dog.sound = "Bark";

const result = dog.makeSound();

console.log(result);
Please open Telegram to view this post
VIEW IN TELEGRAM
πŸ‘10❀8
What is the output?
Anonymous Quiz
44%
Generic sound
14%
undefined
35%
Bark
7%
Error
πŸ‘7πŸ”₯7❀5πŸ€”3
πŸ‘€ Mathematical Symbols and JavaScript Equivalents

We’re not just talking the obvious like + and - but things like ⁿ√, Ξ£, Ξ , βˆƒ, and set notation.

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


var a = 5;
function test() {
console.log(a);
var a = 10;
console.log(a);
}

test();
Please open Telegram to view this post
VIEW IN TELEGRAM
πŸ‘17
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