JavaScript
32K subscribers
1.04K photos
10 videos
33 files
721 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
πŸ₯‚ Woohoo! We've hit 20K members!

Your enthusiasm, contributions, and support have brought us to this milestone. Let’s keep the energy high as we continue to learn, share, and innovate together. Here’s to many more achievements on our journey!

✌️ Check out our emoji pack here

⚑️ Boost us in Telegram

🀝 Collaboration
Please open Telegram to view this post
VIEW IN TELEGRAM
πŸ”₯19πŸ‘7❀3πŸ€”1
CHALLENGE

const array = [1, 2, 3, 4, 5];
const result = array.find(n => n > 3) ? array.every(n => n < 6) : array.some(n => n > 4);

console.log(result);
πŸ‘8
What is the output?
Anonymous Quiz
16%
false
49%
true
14%
4
21%
5
πŸ‘10πŸ€”6❀2🀩2
Please open Telegram to view this post
VIEW IN TELEGRAM
❀4πŸ‘3πŸ”₯1
CHALLENGE

function* generator() {
yield 'a';
yield* 'bcd';
yield 'e';
}

const gen = generator();
console.log([...gen]);
πŸ€”8❀3πŸ”₯2🀩1
πŸ‘8🀩3πŸ€”1
Please open Telegram to view this post
VIEW IN TELEGRAM
❀3πŸ‘1πŸ”₯1
CHALLENGE

const array = [1, 2, [3, 4, [5, 6]]];
const result = array.flat(2).map(n => n * 2);

console.log(result);
πŸ”₯5πŸ‘4🀩1
πŸ‘9🀣4❀2πŸ”₯1🀩1
This media is not supported in your browser
VIEW IN TELEGRAM
πŸŒ• Did you hear? Google Chrome now comes with its Gemini Nano model. (It will be in your browser already.)

Soon, all websites will start using WebAI because the model will run on your computer, and they won't need to spend resources on it.

Narek Hakobyan
Please open Telegram to view this post
VIEW IN TELEGRAM
πŸ‘20πŸ€”12πŸ”₯9❀4🀣4
CHALLENGE

const array = [1, 2, [3, 4, [5, 6]]];
const result = array.flat(2).map(n => n * 2);

console.log(result);
πŸ‘3
🀣21πŸ€”14πŸ‘9πŸ”₯4🀩1
🀩 SquirrellyJS 9: A Powerful Template Engine

A modern, configurable, and fast template engine promising β€œthe power of Nunjucks” and β€œthe simplicity of EJS”. There’s an online playground if you want to see it in action.

Ben Gubler
Please open Telegram to view this post
VIEW IN TELEGRAM
πŸ‘4❀2πŸ”₯2
πŸ˜†
Please open Telegram to view this post
VIEW IN TELEGRAM
🀣71πŸ”₯5πŸ‘2🀩2
CHALLENGE

const array = [1, 2, 3, 4, 5];
const [first, ...rest] = array;

const modified = rest.map((n, i) => i % 2 === 0 ? n * 2 : n);

console.log(first, modified);
❀9πŸ‘4
πŸ‘9
πŸ˜‚
Please open Telegram to view this post
VIEW IN TELEGRAM
🀣108πŸ‘9❀4πŸ”₯1
CHALLENGE

const obj = { a: 1, b: 2 };
const proxy = new Proxy(obj, {
get(target, prop) {
return prop in target ? target[prop] : 0;
}
});

console.log(proxy.a, proxy.b, proxy.c);
❀11πŸ”₯3πŸ‘2
❀6
✌️ How to Annul Promises in JavaScript

You can 'cancel' XHR and fetch requests, but can you cancel regular promises? Currently, no, but Zachary looks into doing the next best thing: telling a promise the game's up, and discarding/ignoring its eventual results.

Zachary Lee
Please open Telegram to view this post
VIEW IN TELEGRAM
πŸ‘7
CHALLENGE

const array = [1, 2, 3];
array[10] = 4;

console.log(array.length);
console.log(array.includes(undefined));