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
SPONSORED BY Lantern Cloud πŸ‘―β€β™€οΈ
Vector database on top of Postgres for AI

❓CHALLENGE
let count = 0;

const counter = (function() {
count = 0;
return function() {
count += 1;
return count;
};
})();

count = 10;
counter();
console.log(count);
Please open Telegram to view this post
VIEW IN TELEGRAM
🀩6πŸ‘3πŸ”₯2❀1πŸ€”1
What is the output?
Anonymous Quiz
13%
0
50%
11
29%
1
8%
NaN
πŸ‘9🀩6❀3
SPONSORED BY Lantern Cloud πŸ‘―β€β™€οΈ
Vector database on top of Postgres for AI

πŸ₯ΉπŸ˜‚πŸ˜†emoji-picker-element: A Lightweight Emoji Picker

An emoji picking control, packaged as a Web Component. You can also add custom emoji to it. GitHub repo.

Nolan Lawson
Please open Telegram to view this post
VIEW IN TELEGRAM
❀3πŸ”₯3πŸ‘2
SPONSORED BY Lantern Cloud πŸ‘―β€β™€οΈ
Vector database on top of Postgres for AI

❓CHALLENGE
const target = {
age: 30
};

const handler = {
get: function(obj, prop) {
return obj[prop]++;
}
};

const proxy = new Proxy(target, handler);

console.log(proxy.age);
console.log(target.age);
console.log(proxy.age);
Please open Telegram to view this post
VIEW IN TELEGRAM
πŸ‘8πŸ€”7πŸ”₯4❀3
πŸ€”8πŸ‘7❀5
SPONSORED BY Lantern Cloud πŸ‘―β€β™€οΈ
Vector database on top of Postgres for AI

πŸ₯Ά A Different Way to Think About TypeScript

β€œa very expressive way to operate over sets, and using those sets to enforce strict compile time checks”

Robby Pruzan
Please open Telegram to view this post
VIEW IN TELEGRAM
πŸ‘5❀3πŸ”₯3
SPONSORED BY Lantern Cloud πŸ‘―β€β™€οΈ
Vector database on top of Postgres for AI

❓ CHALLENGE

let obj1 = { key: 'value1' };
let obj2 = { key: 'value2' };

const weakMap = new WeakMap();
weakMap.set(obj1, 'data1');
weakMap.set(obj2, 'data2');

obj1 = null;
setTimeout(() => {
console.log(weakMap.has(obj1));
console.log(weakMap.has(obj2));
}, 100);
Please open Telegram to view this post
VIEW IN TELEGRAM
❀5πŸ‘2πŸ€”2🀩1
πŸ”₯11πŸ‘7πŸ€”6❀3
SPONSORED BY Lantern Cloud πŸ‘―β€β™€οΈ
Vector database on top of Postgres for AI

πŸ˜† My code after the refactoring
Please open Telegram to view this post
VIEW IN TELEGRAM
🀣17❀3πŸ‘3
SPONSORED BY Lantern Cloud πŸ‘―β€β™€οΈ
Vector database on top of Postgres for AI

❓CHALLENGE
const target = {
secret: "hidden",
reveal: "nothing"
};

const handler = {
get: function(obj, prop, receiver) {
if (prop === "secret") {
return "revealed";
}
return Reflect.get(...arguments);
}
};

const proxy = new Proxy(target, handler);

with (proxy) {
console.log(secret);
console.log(reveal);
}
Please open Telegram to view this post
VIEW IN TELEGRAM
❀2
πŸ”₯8πŸ€”5πŸ‘4❀2
SPONSORED BY Lantern Cloud πŸ‘―β€β™€οΈ
Vector database on top of Postgres for AI

πŸ˜† ✌️ vs πŸ₯Ά
Please open Telegram to view this post
VIEW IN TELEGRAM
🀣46πŸ‘9❀6πŸ€”2🀩1
CHALLENGE

function* evenNumbers() {
let num = 0;
while (true) {
yield num;
num += 2;
}
}

const gen = evenNumbers();
const evens = Array.from({ length: 4 }, () => gen.next().value).map(n => n + 1);

console.log(evens);
πŸ‘2
🀣12πŸ‘8🀩5πŸ”₯3
SPONSORED BY Lantern Cloud πŸ‘―β€β™€οΈ
Vector database on top of Postgres for AI

This is a treasure!

✌️ Do you have any (old or new) Javascript book laying around? We want to see some pictures.

Share with us
Please open Telegram to view this post
VIEW IN TELEGRAM
πŸ‘13❀4πŸ”₯2
SPONSORED BY Lantern Cloud πŸ‘―β€β™€οΈ
Vector database on top of Postgres for AI

❓ CHALLENGE

function* numberDoubler(arr) {
for (const num of arr) {
yield num * 2;
}
}

const result = [...numberDoubler([1, 2, 3])].some(n => n % 4 === 0);

console.log(result);
Please open Telegram to view this post
VIEW IN TELEGRAM
What is the output?
Anonymous Quiz
23%
undefined
24%
false
16%
Error
37%
true
πŸ‘11πŸ€”5πŸ”₯3❀1
This media is not supported in your browser
VIEW IN TELEGRAM
SPONSORED BY Lantern Cloud πŸ‘―β€β™€οΈ
Vector database on top of Postgres for AI

πŸ†’ Projects on roadmap.sh

Projects are a fantastic way to validate your learning and solidify your knowledge. We're thrilled to introduce projects across all of our 50+ roadmaps!

We're starting with the backend roadmap, which now features 18 project ideas of varying difficulty levels. We'll gradually add projects to all our roadmaps making our roadmaps even more powerful.

Kamran Ahmed
Please open Telegram to view this post
VIEW IN TELEGRAM
❀10πŸ‘2🀩1
SPONSORED BY Lantern Cloud πŸ‘―β€β™€οΈ
Vector database on top of Postgres for AI

❓ CHALLENGE

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

const gen = idGenerator();
const ids = Array.from({ length: 3 }, () => gen.next().value).map(id => `ID${id}`);

console.log(ids);
Please open Telegram to view this post
VIEW IN TELEGRAM
❀3
πŸ‘8πŸ€”6πŸ”₯4❀1
SPONSORED BY Lantern Cloud πŸ‘―β€β™€οΈ
Vector database on top of Postgres for AI

πŸ’» What we got wrong about HTTP imports

Ryan Dahl
Please open Telegram to view this post
VIEW IN TELEGRAM
❀3πŸ‘3πŸ”₯1