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 #1571 Β· Back to latest

Older Posts 20 shown
Post #1570 5.81K
  • πŸ‘ 16
  • ❀ 5
  • πŸ”₯ 4
Post #1569 6.15K
CHALLENGE

function* reverseGenerator(arr) {
for (let i = arr.length - 1; i >= 0; i--) {
yield arr[i];
}
}

const result = [...reverseGenerator([1, 2, 3, 4, 5])].join('');

console.log(result);
  • πŸ‘ 3
  • πŸ€” 1
Post #1568 6.39K
🌲 Neon: Rust Bindings for Writing Node.js Modules

Or, as they put it: β€œElectrify Node.js with the power of Rust.” Neon makes it relatively easy to write code in the popular, high speed systems language and run it from Node, much like any other native extension.

Neon Contributors
  • πŸ‘ 7
  • πŸ”₯ 4
  • ❀ 2
Post #1567 21.3K
  • πŸ‘ 7
  • ❀ 6
  • πŸ”₯ 4
  • 🀩 2
Post #1566 6.08K
CHALLENGE

function* alternatingGenerator() {
yield 1;
yield 2;
yield 3;
}

const gen = alternatingGenerator();
const result = [gen.next().value, gen.next().value, gen.next().value].reduce((acc, curr) => acc + curr, 0);

console.log(result);
  • πŸ‘ 1
Post #1565 6.34K
SPONSORED BY Lantern Cloud πŸ‘―β€β™€οΈ
Vector database on top of Postgres for AI

πŸ€” JS-PyTorch: A PyTorch-Like Library for JavaScript

Recently renamed from JS-Torch, this brings some of the magic from Python’s popular PyTorch library to JavaScript for training and testing neural networks in particular. We linked to it earlier this year, but it has added GPU support thanks to GPU.js.

Eduardo Leao
  • ❀ 6
  • πŸ‘ 3
  • πŸ”₯ 2
Post #1564 5.48K
  • πŸ”₯ 7
  • πŸ‘ 6
Post #1563 5.83K
SPONSORED BY Lantern Cloud πŸ‘―β€β™€οΈ
Vector database on top of Postgres for AI

❓ CHALLENGE

function* fibGenerator() {
let a = 0, b = 1;
while (true) {
let next = a + b;
a = b;
b = next;
yield next;
}
}

const gen = fibGenerator();
const fibArray = Array.from({ length: 5 }, () => gen.next().value);

console.log(fibArray);
  • ❀ 4
  • 🀩 1
Post #1561 6.01K
  • πŸ‘ 8
  • πŸ€” 6
  • πŸ”₯ 4
  • ❀ 1
Post #1560 5.82K
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);
  • ❀ 3
Post #1559 6.26K
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
  • ❀ 10
  • πŸ‘ 2
  • 🀩 1
Post #1558 5.28K
  • πŸ‘ 11
  • πŸ€” 5
  • πŸ”₯ 3
  • ❀ 1
Post #1557 5.79K
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);
Post #1556 6.12K
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
  • πŸ‘ 13
  • ❀ 5
  • πŸ”₯ 2
Post #1555 5.35K
  • 🀣 12
  • πŸ‘ 8
  • 🀩 5
  • πŸ”₯ 3
Post #1554 5.69K
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
Post #1553 6.49K
SPONSORED BY Lantern Cloud πŸ‘―β€β™€οΈ
Vector database on top of Postgres for AI

πŸ˜† ✌️ vs πŸ₯Ά
  • 🀣 46
  • πŸ‘ 9
  • ❀ 6
  • πŸ€” 2
  • 🀩 1
Post #1552 5.42K
  • πŸ”₯ 8
  • πŸ€” 5
  • πŸ‘ 4
  • ❀ 2
Post #1551 5.9K
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);
}
  • ❀ 2
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 β†’