JavaScript
32K subscribers
1.04K photos
10 videos
33 files
717 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
๐ŸคŸ Node.js Toolbox: A Way to Find and Compare Node.js Packages

A fantastic community maintained resource that presents a category-based way to find packages and libraries. For example, you can check out HTTP frameworks, browser testing, query builders, and more. You can compare libraries in various ways, see their download count, or edit/submit listings yourself.

Maxim Orlov
Please open Telegram to view this post
VIEW IN TELEGRAM
โค6๐Ÿ”ฅ3๐Ÿ‘2
CHALLENGE

const weakMap = new WeakMap();
const obj1 = {};
const obj2 = {};

weakMap.set(obj1, 'value1');
weakMap.set(obj2, 'value2');

const arr = [obj1, obj2];
const result = arr.map(obj => weakMap.get(obj)).join(', ');

console.log(result);
๐Ÿ‘3โค1
๐Ÿ‘14โค8๐Ÿ”ฅ7
Please open Telegram to view this post
VIEW IN TELEGRAM
๐Ÿ”ฅ11โค5๐Ÿ‘2๐Ÿค”2
CHALLENGE

function* idGenerator() {
let id = 1;
while (true) {
yield id++;
}
}

const gen = idGenerator();
const weakMap = new WeakMap();
const objs = [{}, {}, {}];

objs.forEach(obj => weakMap.set(obj, gen.next().value));

const result = objs.map(obj => weakMap.get(obj)).filter(id => id % 2 === 0);

console.log(result);
๐Ÿ‘5โค4๐Ÿ”ฅ2
What is the output?
Anonymous Quiz
32%
[1, 2, 3]
19%
[1, 3]
38%
[2]
11%
Error
๐Ÿ‘3๐Ÿ”ฅ1
๐ŸŒฒ ๐Ÿงต worker_map: Tread-safe map structure for worker_threads

A simple abstraction for Node.js worker_threads, allowing you to create and share a Map (hash table) between worker threads and the main process.
Please open Telegram to view this post
VIEW IN TELEGRAM
โค6๐Ÿ‘4๐Ÿ”ฅ2
CHALLENGE

const weakMap = new WeakMap();
const obj = {};

(function() {
const obj1 = { name: 'inner' };
weakMap.set(obj1, 'inner value');
})();

const result = weakMap.get(obj);

console.log(result);
๐Ÿ‘8
What is the output?
Anonymous Quiz
41%
"inner value"
13%
Error
35%
undefined
11%
null
๐Ÿ‘14โค4๐Ÿค”4๐Ÿ”ฅ1
๐Ÿ“ธ Immerse Yourself in Generative Art: An Angular WebXR Adventure

If you missed the Google I/O Angular session, you missed not only the latest updates on Angular but also the Generative Art Gallery demo which I had so much fun building. The demo has all of my favorite technologies, including AI, Angular and WebXR. It also was a very pleasant developer experience. Let me tell you why!

AyลŸegรผl Yรถnet
Please open Telegram to view this post
VIEW IN TELEGRAM
โค5๐Ÿ‘3๐Ÿ”ฅ2
CHALLENGE

const weakMap = new WeakMap();
const obj = {};
const gen = (function* () {
yield 'value1';
yield 'value2';
})();

weakMap.set(obj, gen.next().value);

console.log(weakMap.get(obj));
console.log(gen.next().value);
๐Ÿ‘4
๐Ÿ‘11โค4๐Ÿค”4๐Ÿ”ฅ3
๐Ÿ˜‰ A day as a Remote Software Engineer in Helsinki, Finland

I've always wanted to create a video series to share my experiences and work style as a remote software engineer. I finally started this journey and am excited to make more videos like this...

nairi
Please open Telegram to view this post
VIEW IN TELEGRAM
1๐Ÿ‘18๐Ÿ”ฅ7โค5๐Ÿค”2๐Ÿคฉ1
CHALLENGE

const weakMap = new WeakMap();
const gen = (function* () {
yield { key: 'value1' };
yield { key: 'value2' };
})();

const obj1 = gen.next().value;
const obj2 = gen.next().value;

weakMap.set(obj1, 'stored value1');
weakMap.set(obj2, 'stored value2');

const result = [...gen].map(obj => weakMap.get(obj));

console.log(result);
๐Ÿ‘7โค5๐Ÿ”ฅ3๐Ÿคฉ2
๐Ÿ‘10๐Ÿ”ฅ6๐Ÿค”5โค4
โœŒ๏ธ ECMAScript Safe Assignment Operator Proposal

We often feature ECMAScript proposals that are in their later stages, but how about a brand new one you could get involved with? This one proposes an interesting additional bit of language syntax (`?=`) that returns a [error, value] tuple from an assignment.

Arthur Fiorette
Please open Telegram to view this post
VIEW IN TELEGRAM
2๐Ÿ‘7๐Ÿค”7โค4๐Ÿ”ฅ2
CHALLENGE

const weakMap = new WeakMap();
const array = [{}, {}];

array.forEach(obj => weakMap.set(obj, obj));
const result = array.map(obj => weakMap.get(obj) === obj);

console.log(result);
2๐Ÿ‘8
๐Ÿ‘11๐Ÿค”5โค4๐Ÿ”ฅ1
๐Ÿ˜ญ ...
Please open Telegram to view this post
VIEW IN TELEGRAM
2๐Ÿคฃ50๐Ÿ‘8โค5๐Ÿ”ฅ1๐Ÿค”1
Sponsored by Bryntum ๐Ÿ‘ฎโ€โ™€๏ธ
World Class Web Components

โ“ CHALLENGE


const weakMap = new WeakMap();
const obj = {};

(function() {
const internalObj = {};
weakMap.set(internalObj, 'hidden');
obj.ref = internalObj;
})();

delete obj.ref;

const result = weakMap.has(obj.ref);

console.log(result);
Please open Telegram to view this post
VIEW IN TELEGRAM
2๐Ÿ”ฅ7๐Ÿค”6๐Ÿ‘5โค3
What is the output?
Anonymous Quiz
33%
undefined
32%
true
31%
false
4%
Error
๐Ÿ‘1