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

Older Posts 20 shown
Post #1490 7.27K
🀩 BWIP-JS: A Barcode Writer in Pure JavaScript

A library that can generate barcodes using over 100 different barcode types and standards, both single and two dimensional. There is, of course, a live demo where you, too, can discover far more types of barcodes exist than you ever imagined.

Mark Warren
  • ❀ 5
  • πŸ”₯ 5
  • πŸ‘ 3
Post #1488 6.91K
  • πŸ‘ 16
  • πŸ”₯ 6
  • πŸ€” 5
  • ❀ 4
Post #1487 6.94K
CHALLENGE

const obj = { a: 1, b: 2 };
const obj2 = { ...obj, b: 3 };

const samePrototype = Object.getPrototypeOf(obj) === Object.getPrototypeOf(obj2);

console.log(samePrototype);
Post #1486 7.6K
⚑️ Dynamically loaded extensions in Postgres in the browser

At a recent AGI House hackathon in San Francisco, we set out to run our Postgres vector extension directly in the browser. This would allow our documentation examples and small demos to be fully executable within the browser using a Postgres instance compiled to Wasm and running on the client browser.

lantern
  • πŸ”₯ 8
  • ❀ 4
  • πŸ‘ 3
  • 🀩 2
  • πŸ€” 1
Post #1485 6.61K
  • πŸ‘ 23
  • πŸ”₯ 9
  • ❀ 4
  • πŸ€” 3
  • 🀩 2
Post #1484 6.64K
CHALLENGE

const arr = [1, 2, 3, 4, 5];
const sliced = arr.slice(1, 3);
const spliced = arr.splice(1, 3);

console.log(sliced, spliced, arr);
  • πŸ‘ 13
  • ❀ 1
Post #1483 7.48K
πŸ˜†
  • 🀣 104
  • ❀ 4
  • 🀩 3
  • πŸ”₯ 1
Post #1482 7.27K
  • πŸ€” 15
  • πŸ‘ 6
  • 🀩 2
  • ❀ 1
Post #1481 7.16K
CHALLENGE

const obj1 = { a: 1, b: { c: 2 } };
const obj2 = { ...obj1 };

obj1.b.c = 3;

console.log(obj2.b.c);
  • πŸ‘ 7
  • ❀ 6
Post #1479 7.31K
  • πŸ”₯ 9
  • πŸ‘ 5
  • ❀ 3
Post #1478 6.88K
CHALLENGE

const array = [1, 2, 3, 4, 5];
const result = array.some(n => n % 2 === 0) && array.every(n => n < 10);

console.log(result);
  • πŸ‘ 5
  • ❀ 4
Post #1476 6.99K
  • πŸ‘ 2
Post #1475 6.69K
CHALLENGE

const obj = {
a: 1,
b() {
return this.a;
}
};

const b = obj.b;
console.log(b.call({ a: 2 }));
  • πŸ‘ 20
  • ❀ 5
  • 🀩 2
Post #1474 7.03K
πŸ“Š Sliderland: A Minimalist Coding Playground

A slider control based visualization you can code with simple formulas. We last linked to this a few years ago, but it’s still a fun way to do some quick, visual JS math experimentation. Tixy.land is along similar lines, but based on a 2D grid.

blinry
  • ❀ 8
  • πŸ‘ 4
  • πŸ”₯ 1
Post #1473 6.69K
  • πŸ‘ 21
  • πŸ€” 12
  • ❀ 11
  • 🀣 6
Post #1472 6.71K
CHALLENGE

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

console.log(array.length);
console.log(array.includes(undefined));
Post #1471 7.11K
✌️ 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
  • πŸ‘ 7
Post #1470 6.96K
  • ❀ 6
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 β†’