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
899

Showing posts older than #1912 Β· Back to latest

Older Posts 20 shown
Post #1911 7.56K
  • πŸ€” 14
  • πŸ‘ 7
  • ❀ 5
  • 🀣 2
Post #1910 7.76K
CHALLENGE

var obj = {
a: 10,
b: 20,
c: 'hello'
};

with (obj) {
var sum = a + b;
var greeting = c + ' world';
}

console.log(sum, greeting);
  • πŸ‘ 15
  • πŸ”₯ 2
  • 🀩 2
Post #1908 8.04K
  • ❀ 6
  • πŸ‘ 6
  • πŸ”₯ 2
  • 🀩 1
Post #1907 7.78K
CHALLENGE

const numbers = [2, 4, 6, 8];
const sum = numbers.reduce((acc, num) => acc + num, 0);
console.log(sum);
  • πŸ‘ 6
  • πŸ€” 5
Post #1905 8.21K
  • πŸ€” 13
  • πŸ‘ 11
  • ❀ 6
Post #1904 7.66K
CHALLENGE

const symbol1 = Symbol('desc1');
const symbol2 = Symbol('desc2');
const myObject = {};
myObject[symbol1] = 'Value1';
myObject[symbol2] = 'Value2';
let output = '';
for (let key in myObject) {
output += myObject[key] + ' ';
}
output += Object.getOwnPropertySymbols(myObject).length;
console.log(output);
  • πŸ‘ 8
  • ❀ 4
Post #1902 7.53K
  • πŸ€” 17
  • πŸ‘ 7
  • ❀ 2
Post #1901 7.38K
CHALLENGE ❓


class MyClass {
constructor() {
this.a = 10;
}
}
MyClass.prototype.b = 20;
const obj = new MyClass();
delete obj.b;
console.log(obj.b);
  • πŸ‘ 8
  • ❀ 5
Post #1899 7.43K
  • ❀ 12
  • πŸ‘ 7
  • πŸ”₯ 1
  • 🀣 1
Post #1898 7.07K
CHALLENGE ❓


const map = new Map();
map.set("key", undefined);
console.log(map.has("key"), map.get("key"));
  • πŸ‘ 7
Post #1896 7.31K
  • πŸ‘ 17
  • ❀ 7
  • πŸ”₯ 3
  • πŸ€” 1
Post #1895 7.05K
CHALLENGE ❓

const obj = {
0: "zero",
1: "one",
length: 2
};
console.log(Array.from(obj));
  • πŸ‘ 4
  • ❀ 1
  • πŸ€” 1
Post #1894 7.32K
⚑️ test262.fyi presents an interesting technical view of how different JavaScript engines fare on the official ECMAScript conformance test suite.
  • ❀ 3
  • πŸ‘ 3
  • πŸ”₯ 3
Post #1893 7.25K
  • πŸ€” 19
  • πŸ‘ 13
  • ❀ 5
  • πŸ”₯ 2
Post #1892 6.82K
CHALLENGE ❓


function foo() {}
foo.prototype.bar = 42;
const obj = new foo();
foo.prototype = { bar: 100 };
console.log(obj.bar);
  • πŸ‘ 7
  • ❀ 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 β†’