TGViewer
Channel Public Channel
JavaScript

JavaScript

@javascript

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
Subscribers
31K
Photos
1.2K
Videos
10
Links
901

Showing posts older than #1470 Β· Back to latest

Older Posts 20 shown
Post #1469 6.91K
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
Post #1468 7.43K
πŸ˜‚
  • 🀣 108
  • πŸ‘ 9
  • ❀ 4
  • πŸ”₯ 1
Post #1467 6.57K
  • πŸ‘ 9
Post #1466 6.76K
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);
  • ❀ 10
  • πŸ‘ 4
Post #1465 7.34K
πŸ˜†
  • 🀣 71
  • πŸ”₯ 5
  • πŸ‘ 2
  • 🀩 2
Post #1464 6.49K
🀩 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
  • πŸ‘ 4
  • ❀ 3
  • πŸ”₯ 2
Post #1463 6.76K
  • 🀣 21
  • πŸ€” 14
  • πŸ‘ 9
  • πŸ”₯ 4
  • 🀩 1
Post #1461 6.71K
CHALLENGE

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

console.log(result);
  • πŸ‘ 3
  • ❀ 2
Post #1460 7.22K
πŸŒ• 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
  • πŸ‘ 20
  • πŸ€” 12
  • πŸ”₯ 9
  • ❀ 4
  • 🀣 4
Post #1459 6.37K
  • πŸ‘ 9
  • 🀣 4
  • ❀ 2
  • πŸ”₯ 1
  • 🀩 1
Post #1458 6.69K
CHALLENGE

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

console.log(result);
  • πŸ”₯ 5
  • πŸ‘ 4
  • 🀩 1
Post #1456 6.95K
  • πŸ‘ 8
  • 🀩 3
  • πŸ€” 1
Post #1455 6.67K
CHALLENGE

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

const gen = generator();
console.log([...gen]);
  • πŸ€” 8
  • ❀ 3
  • πŸ”₯ 2
  • 🀩 1
Post #1453 7.03K
  • πŸ‘ 10
  • πŸ€” 6
  • ❀ 2
  • 🀩 2
Post #1452 6.74K
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
Post #1451 7.06K
πŸ₯‚ 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
  • πŸ”₯ 19
  • πŸ‘ 7
  • ❀ 3
  • πŸ€” 1
Post #1450 5.98K
  • πŸ‘ 10
  • 🀩 7
  • ❀ 2
  • πŸ€” 1
Post #1449 6.33K
CHALLENGE

const obj1 = { a: 1 };
const obj2 = Object.create(obj1);
obj2.b = 2;

const result = Object.entries(obj2).map(([key, value]) => key + value);

console.log(result);
Older posts β†’
Threads Profile ViewerView any public Threads profile without an account.Open ThreadLook β†’Writing with AI? Make it sound human.Metric37 rewrites AI drafts so they read naturally. Free AI detector, 1,500 words free.Try Metric37 β†’