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

Older Posts 20 shown
Post #1650 5.63K
  • 🀣 23
  • ❀ 5
  • πŸ”₯ 4
  • 🀩 2
Post #1649 5.91K
CHALLENGE

const obj = {
value: 1,
increment() {
this.value++;
}
};

const increment = obj.increment;
increment();

console.log(obj.value);
  • πŸ‘ 9
Post #1647 6.29K
  • πŸ‘ 11
  • ❀ 8
  • πŸ€” 5
Post #1646 6.22K
CHALLENGE

const obj = {
data: [1, 2, 3],
getData() {
return this.data.map(x => x * 2);
}
};

const newData = obj.getData.bind({ data: [4, 5, 6] })();
console.log(newData);
  • πŸ‘ 8
  • ❀ 2
Post #1645 6.73K
πŸ˜†
  • 🀣 113
  • πŸ‘ 7
  • πŸ”₯ 6
  • πŸ€” 2
Post #1644 5.8K
  • πŸ”₯ 17
  • πŸ‘ 5
  • πŸ€” 3
  • 🀣 2
Post #1643 6K
CHALLENGE

const obj = {
count: 0,
increment() {
this.count++;
},
getCount() {
return (() => this.count)();
}
};

obj.increment();
obj.increment();

console.log(obj.getCount());
  • πŸ‘ 12
  • πŸ”₯ 5
  • 🀣 2
Post #1642 5.51K
  • ❀ 3
  • πŸ‘ 2
  • πŸ”₯ 2
Post #1640 5.48K
  • πŸ‘ 6
Post #1639 5.33K
  • ❀ 3
Post #1637 4.97K
Help us improve our newsletter by rating your experience from 1 to 5. Your input is invaluable in helping us deliver the best content possible!
  • πŸ‘ 11
Post #1635 5.27K
  • πŸ”₯ 9
  • πŸ‘ 3
  • ❀ 1
Post #1634 5.34K
CHALLENGE

const obj = {
value: 42,
getValue() {
return Math.max(this.value, 50);
}
};

const obj2 = {
value: 25,
getValue: obj.getValue
};

console.log(obj.getValue());
console.log(obj2.getValue());
  • ❀ 8
  • πŸ‘ 2
Post #1633 5.6K
Material UI v6 is out now πŸŽ‰

At ten years old, the popular design system has its latest major release. There's a focus on improved theming, color scheme management, container queries, and React 19 support. There are revamped templates to be inspired by, too.

GarcΓ­a, Bittu, Andai, et al.
  • ❀ 3
  • πŸ‘ 3
  • πŸ”₯ 2
  • 🀣 1
Post #1632 5.52K
  • ❀ 9
  • πŸ‘ 3
  • πŸ”₯ 2
Post #1631 5.63K
CHALLENGE

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

const cloneObj = { ...obj, getSum() { return this.b + this.a; } };

console.log(obj.getSum());
console.log(cloneObj.getSum());
  • 🀣 11
  • πŸ”₯ 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 β†’