TGViewer
JavaScript JavaScript @javascript · 31.1K subscribers
Post #3519 395
CHALLENGE

const obj = {
value: 42,
getValue() { return this?.value; },
getValueArrow: () => this?.value
};
const { getValue, getValueArrow } = obj;
console.log(obj.getValue(), getValue(), obj.getValueArrow(), getValueArrow());
More from @javascript
  1. Sep 26, 2026Post #3520
  2. Sep 25, 2026Post #3518
  3. Sep 25, 2026CHALLENGE let counter = 0; const mod = { get counter() { return counter; }, increment() {…
  4. Sep 24, 2026Post #3516
  5. Sep 24, 2026CHALLENGE class Base { static count = 0; static increment() { this.count++; return this.co…
  6. Sep 23, 2026🤩 tinyjs: Build JavaScript Desktop Apps in <10MB I built an app with this and was impress…
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 →