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

Older Posts 20 shown
Post #1550 5.72K
SPONSORED BY Lantern Cloud πŸ‘―β€β™€οΈ
Vector database on top of Postgres for AI

πŸ˜† My code after the refactoring
  • 🀣 17
  • ❀ 3
  • πŸ‘ 3
Post #1549 6.17K
  • πŸ”₯ 11
  • πŸ‘ 7
  • πŸ€” 6
  • ❀ 3
Post #1548 6K
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);
  • ❀ 5
  • πŸ‘ 2
  • πŸ€” 2
  • 🀩 1
Post #1547 5.99K
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
  • πŸ‘ 5
  • ❀ 3
  • πŸ”₯ 3
Post #1546 5.68K
  • πŸ€” 8
  • πŸ‘ 7
  • ❀ 5
Post #1545 5.89K
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);
  • πŸ‘ 8
  • πŸ€” 7
  • πŸ”₯ 4
  • ❀ 3
Post #1543 5.87K
  • πŸ‘ 9
  • 🀩 6
  • ❀ 3
Post #1542 5.9K
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);
  • 🀩 6
  • πŸ‘ 3
  • πŸ”₯ 2
  • ❀ 1
  • πŸ€” 1
Post #1540 5.49K
  • πŸ€” 13
  • ❀ 7
  • 🀣 5
  • πŸ‘ 4
  • πŸ”₯ 3
  • 🀩 1
Post #1539 5.83K
SPONSORED BY Lantern Cloud πŸ‘―β€β™€οΈ
Vector database on top of Postgres for AI

❓ CHALLENGE

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

console.log(b.value);
console.log(a.value);
  • πŸ‘ 3
Post #1538 6.36K
SPONSORED BY Blacksmith πŸ‘©β€πŸš’
Run GitHub Actions 2x faster at half the cost.

‼️ Astro 4.12: Say Hello to Server Islands

The flexible Astro framework for building modern content-based sites continues to go from strength to strength. v4.12 includes a new concept of server islands, a way to integrate static HTML and server-side generated components together.

Erika and Phillips (Astro)
  • πŸ‘ 4
  • πŸ”₯ 3
  • ❀ 2
Post #1537 5.54K
  • 🀣 14
  • ❀ 8
  • πŸ‘ 6
  • πŸ”₯ 2
  • πŸ€” 2
Post #1536 5.89K
SPONSORED BY Blacksmith πŸ‘©β€πŸš’
Run GitHub Actions 2x faster at half the cost.

CHALLENGE ❓


const obj = { a: 1, b: 2 };
Object.defineProperty(obj, 'b', { value: 3, writable: false });

obj.b = 4;
console.log(obj.b);
  • πŸ‘ 5
  • πŸ”₯ 2
  • πŸ€” 1
Post #1535 6.2K
SPONSORED BY Blacksmith πŸ‘©β€πŸš’
Run GitHub Actions 2x faster at half the cost.

❓ So You Think You Know Box Shadows?

The author indulges his creative side with some fun experiments into what he calls β€œsome of the worst possible things” you can do with box shadows on a DIV element, coupled with JavaScript.

David Gerrells
  • ❀ 3
  • πŸ”₯ 3
  • πŸ‘ 2
Post #1534 5.83K
  • πŸ€” 23
  • πŸ‘ 9
  • πŸ”₯ 5
  • ❀ 3
Post #1533 6.06K
SPONSORED BY Blacksmith πŸ‘©β€πŸš’
Run GitHub Actions 2x faster at half the cost.

CHALLENGE ❓


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

const { b } = obj;
console.log(b());
  • πŸ‘ 1
Post #1532 6.12K
SPONSORED BY Blacksmith πŸ‘©β€πŸš’
Run GitHub Actions 2x faster at half the cost.

πŸ˜‰ Don't Use JS for That: Moving Features to CSS and HTML by Kilian Valkhof

Packed with code and examples. Some techniques aren’t universally supported yet, but there’s a lot that the browser can offer that you don’t need to reimplement yourself, like color picking, modals, and animations.

Kilian Valkhof
  • πŸ‘ 7
  • ❀ 2
  • πŸ”₯ 2
Post #1531 5.61K
  • πŸ‘ 8
  • πŸ€” 4
  • 🀣 4
  • ❀ 3
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 β†’