JavaScript
32.1K subscribers
1.04K photos
10 videos
33 files
724 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
19%
1, 2
43%
2, 3
12%
3, 3
25%
2, 2
👍15🤔95🤩4🔥3
Please open Telegram to view this post
VIEW IN TELEGRAM
🔥6👍21
CHALLENGE

console.log(1);

setTimeout(() => {
console.log(2);
}, 100);

setTimeout(() => {
console.log(3);
}, 0);

Promise.resolve().then(() => {
console.log(4);
}).then(() => {
console.log(5);
});

console.log(6);
👍83
11🤔5🤩4👍3🔥3
🧠 Brainchop 4.0

An in-browser 3D MRI rendering system. (Demo.)
Please open Telegram to view this post
VIEW IN TELEGRAM
🤣10🔥54👍4
CHALLENGE

const obj = {
a: 1,
b: function() {
return () => {
return this.a;
};
},
c: function() {
return function() {
return this.a;
};
}
};

const arrowFunc = obj.b();
const regularFunc = obj.c();

console.log(arrowFunc());
console.log(regularFunc());
👍9🤔6
17🤔13👍5🤣3🔥1
🤔 City in a Bottle: Raycasting in 256 Bytes

Frank has a great reputation for putting together stunning visual demos with the tiniest amounts of JavaScript. This is no exception. He goes into a lot of detail about how it works; you’ll learn a few things and/or come away awe-struck.

FRANK FORCE
Please open Telegram to view this post
VIEW IN TELEGRAM
👍32🔥2🤩2
CHALLENGE

function* generator() {
yield* [1, 2, 3];
yield 4;
}

const gen = generator();
console.log([...gen]);
1👍1🤣1
What is the output?
Anonymous Quiz
17%
[4]
12%
[1, 4]
17%
[1, 2, 3]
54%
[1, 2, 3, 4]
🤩9🤣8🔥5👍31🤔1
Creating Realistic Handwriting with p5.js

Amy wanted to programatically bring her (cursive) handwriting into some diagrams she was making and figured out how to make it happen with p5.js. Here's how.

AMY GOODCHILD
Please open Telegram to view this post
VIEW IN TELEGRAM
👍81🔥1
CHALLENGE

function* generator() {
yield 1;
yield 2;
yield 3;
}

const gen1 = generator();
const gen2 = generator();

console.log(gen1.next().value);
console.log(gen2.next().value);
console.log(gen1.next().value);
console.log(gen2.next().value);
5👍2🤔1
What is the output?
Anonymous Quiz
47%
1,1,2,2
27%
1,2,3,1
11%
1,1,1,2
15%
2,1,2,1
👍125🔥3🤩2
Please open Telegram to view this post
VIEW IN TELEGRAM
9👍2🔥1
CHALLENGE

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

const gen = generator();
console.log(gen.next().value);
console.log(gen.next().value);
console.log(gen.next().value);
console.log(gen.next().value);
👍31
👍97🤔3
CHALLENGE

function* generator() {
yield 1;
return 2;
}

const gen = generator();
console.log(gen.next().value);
console.log(gen.next().value);
🤔8👍32
🤣19🤔9🤩7👍5🔥3
👀 How 1Password Used esbuild to Cut Browser Extension Build Times

1Password is a popular password management tool that relies upon a browser extension to fill out passwords on the Web. At over a minute for a single build, things were starting to drag for the devs. Could esbuild help? A fun story with plenty of technical details.

Jarek Samic
Please open Telegram to view this post
VIEW IN TELEGRAM
🔥5👍41
CHALLENGE

function* generator() {
yield 1;
yield* [2, 3];
yield 4;
}

const gen = generator();
for (const value of gen) {
console.log(value);
}
3👍2
What is the output?
Anonymous Quiz
14%
1, 4
11%
1, 2, 3
69%
1, 2, 3, 4
5%
2, 3, 4
👍114🤩2