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
47%
1,1,2,2
27%
1,2,3,1
11%
1,1,1,2
15%
2,1,2,1
πŸ‘12❀5πŸ”₯3🀩2
✌️ SOME UPDATES
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);
πŸ‘3❀1
πŸ‘9❀7πŸ€”3
CHALLENGE

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

const gen = generator();
console.log(gen.next().value);
console.log(gen.next().value);
πŸ€”8πŸ‘3❀2
🀣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πŸ‘4❀1
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
πŸ‘11❀4🀩2
✌️ Regexper: Display JavaScript Regular Expressions as Railroad Diagrams

Might come in handy for learning regular expressions or if you have a complex regular expression and you don’t know what it does (not an uncommon situation..!)

Jeff Avallone
Please open Telegram to view this post
VIEW IN TELEGRAM
πŸ”₯6❀1πŸ‘1
CHALLENGE

function* generator1() {
yield 1;
yield 2;
}

function* generator2() {
yield* generator1();
yield 3;
}

const gen = generator2();
console.log(gen.next().value);
console.log(gen.next().value);
console.log(gen.next().value);
πŸ‘5❀3🀩1
🀩15πŸ‘8❀7
🍊 Qlock: A JavaScript Quine Clock

We linked to Martin's array of creative JavaScript experiments earlier, but why not finish with one that particularly tickled us? A quine is a program that takes no input but manages to produce, as output, its own source code. Here’s a fun JavaScript example that isn’t merely a quine, but a clock too.

Martin Kleppe
Please open Telegram to view this post
VIEW IN TELEGRAM
πŸ”₯6❀5πŸ‘4πŸ€”1
CHALLENGE

function* generator() {
const value = yield 1;
yield value;
}

const gen = generator();
console.log(gen.next().value);
console.log(gen.next(2).value);
πŸ‘4πŸ€”2
❀13πŸ€”7🀣2🀩1
Please open Telegram to view this post
VIEW IN TELEGRAM
❀3πŸ‘2
CHALLENGE

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

const gen = generator();
console.log(gen.next().value);
console.log(gen.next().value);
console.log(gen.next().value);
πŸ‘2πŸ”₯2
πŸ”₯11❀4πŸ‘4πŸ€”4
Even though Armenia πŸ‡¦πŸ‡² is a small country, we have a really big JavaScript community 😎.
There are many events related to JavaScript, and another one is happening tomorrow: JSConf Armenia 2024!

If you are in Armenia and would like to attend, just grab your tickets from the website.
❀17πŸ‘7🀣7πŸ”₯4
CHALLENGE

function* generator() {
yield 1;
yield new Promise(resolve => resolve(2));
yield 3;
}

const gen = generator();
console.log(gen.next().value);
gen.next().value.then(console.log);
console.log(gen.next().value);
πŸ‘5🀩2❀1
πŸ‘9πŸ”₯8❀4