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

Older Posts 20 shown
Post #1530 6.03K
SPONSORED BY Blacksmith πŸ‘©β€πŸš’
Run GitHub Actions 2x faster at half the cost.

CHALLENGE ❓


function* generator() {
yield* [1, 2];
yield* (function* () { yield 3; yield 4; })();
}

const gen = generator();

console.log([...gen]);
  • πŸ”₯ 7
  • πŸ‘ 4
  • ❀ 2
Post #1528 5.88K
  • ❀ 10
  • πŸ€” 6
  • πŸ‘ 3
  • πŸ”₯ 3
  • 🀩 3
Post #1527 5.97K
SPONSORED BY Blacksmith πŸ‘©β€πŸš’
Run GitHub Actions 2x faster at half the cost.

CHALLENGE ❓


const array = [1, 2, 3];
const result = array.map(function(n) {
return this ? n : 0;
}, false);

console.log(result);
  • πŸ‘ 6
  • ❀ 4
  • πŸ”₯ 3
Post #1526 6.28K
SPONSORED BY Blacksmith πŸ‘©β€πŸš’
Run GitHub Actions 2x faster at half the cost.

The newer CSS viewport units (svh, lvh, dvh) are one of my favourite features in modern CSS
πŸ”₯

β†’ The "smallest viewport height" (svh) will always fit the smallest amount of space (all content will always be visible)

β†’ The "largest viewport height" (lvh) will always take up the largest amount of space (potentially hiding some content underneath UI)

β†’ The "dynamic viewport height" (dvh) will resize to fit the currently available space (adapting as the browser UI gets visible or hidden)

Mads Brodt
  • πŸ”₯ 16
  • ❀ 7
  • πŸ‘ 5
Post #1525 5.55K
  • πŸ‘ 3
Post #1524 6.03K
SPONSORED BY Blacksmith πŸ‘©β€πŸš’
Run GitHub Actions 2x faster at half the cost.

CHALLENGE ❓


const obj = { a: 1, b: 2 };
const descriptor = Object.getOwnPropertyDescriptor(obj, 'a');

descriptor.value = 3;
Object.defineProperty(obj, 'a', descriptor);

console.log(obj.a);
  • πŸ‘ 6
  • ❀ 4
  • πŸ”₯ 3
Post #1523 6.14K
SPONSORED BY Blacksmith πŸ‘©β€πŸš’
Run GitHub Actions 2x faster at half the cost.

🌲 Graceful Shutdown in NodeJS

In this article, I will show you how to do a graceful shutdown in a NodeJS application, but first, let's describe what "graceful shutdown" means and why we need to do that in our application and what are the benefits.

nairihar
  • ❀ 6
  • πŸ”₯ 3
  • πŸ‘ 2
Post #1522 5.67K
  • πŸ‘ 14
  • ❀ 6
Post #1521 6.1K
SPONSORED BY Blacksmith πŸ‘©β€πŸš’
Run GitHub Actions 2x faster at half the cost.

CHALLENGE ❓


function test() {
console.log(arguments.length);
}

test(1, 2, 3);
test.call(null, 1, 2, 3);
  • ❀ 6
  • πŸ‘ 6
  • πŸ”₯ 2
Post #1520 6.4K
SPONSORED BY Blacksmith πŸ‘©β€πŸš’
Run GitHub Actions 2x faster at half the cost.

✌️ JavaScript weekly #698
  • ❀ 5
  • πŸ‘ 5
  • πŸ”₯ 2
  • πŸ€” 2
  • 🀣 1
Post #1519 6.13K
  • πŸ‘ 9
  • ❀ 8
  • πŸ”₯ 4
Post #1518 6.26K
SPONSORED BY Blacksmith πŸ‘©β€πŸš’
Run GitHub Actions 2x faster at half the cost.

CHALLENGE ❓


const array = [1, 2, 3, 4];
const result = array.reduceRight((acc, val) => acc - val);

console.log(result);
Post #1517 6.65K
SPONSORED BY Blacksmith πŸ‘©β€πŸš’
Run GitHub Actions 2x faster at half the cost.

✌️ I am not... I repeat, I am not... a "frontend developer", just because I like to write JS.

I'm also not a "backend developer" b/c I like to write communication-oriented code, to manage and transmit data and juggle asynchony and other non-UI stuff.
I'm a middle-end dev. Forever. I build libraries, tools, etc. My product is what another dev uses to build their product.

Kyle Simpson
  • πŸ‘ 9
  • πŸ”₯ 7
  • ❀ 4
Post #1516 6.35K
  • πŸ‘ 19
Post #1515 6.4K
SPONSORED BY Blacksmith πŸ‘©β€πŸš’
Run GitHub Actions 2x faster at half the cost.

CHALLENGE
❓


const obj = {
a: 1,
b() {
return new Promise(resolve => {
setTimeout(() => {
resolve(this.a);
}, 100);
});
}
};

obj.b().then(console.log);

obj.a = 2;
  • πŸ‘ 18
  • πŸ”₯ 6
  • πŸ€” 6
  • ❀ 5
Post #1513 6.8K
πŸ“Ž Sponsorship opportunity!

We are excited to share that our JavaScript newsletter has become quite popular in our community!

With 21k subscribers and around 80 new joiners every day, we see a fantastic engagement with 20-30K reads daily.

If your company is interested in sponsoring and collaborating with our newsletter, we'd love to hear from you!

Feel free to contact me.
  • πŸ‘ 6
  • ❀ 4
  • πŸ”₯ 4
Post #1512 6.13K
  • πŸ€” 11
  • πŸ”₯ 9
  • πŸ‘ 6
Post #1511 6.45K
CHALLENGE

const array = [1, 2, 3];
const obj = { a: 1, b: 2 };

array.push(obj);
obj.a = 3;

console.log(array[3].a);
  • πŸ‘ 8
  • πŸ€” 1
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 β†’