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
31.1K
Photos
1.2K
Videos
10
Links
895

Showing posts older than #2901 · Back to latest

Older Posts 20 shown
Post #2900 3.69K
😮 The 2025 JavaScript Rising Stars

At the start of each year, Michael rounds up the projects in the JavaScript ecosystem that gained the most popularity on GitHub in the prior year. After a two-year run of topping the chart, shadcn/ui has been pushed down to #3 by n8n and React Bits. This is a fantastic roundup, now in its tenth(!) year, and features commentary from a few industry experts too.

Michael Rambeau et al.
  • ❤ 6
  • 👍 3
  • 🔥 3
Post #2899 3.47K
  • 👍 8
  • 🤔 4
  • ❤ 3
  • 🤣 2
  • 🔥 1
Post #2898 3.43K
CHALLENGE

const obj = { a: 1, b: 2, c: 3 };
const entries = Object.entries(obj);
const keys = Object.keys(obj);
const values = Object.values(obj);

const result = {
entriesLength: entries.length,
keysJoined: keys.join('-'),
valuesSum: values.reduce((sum, val) => sum + val, 0),
firstEntry: entries[0]
};

console.log(result.entriesLength);
console.log(result.keysJoined);
console.log(result.valuesSum);
console.log(result.firstEntry);
  • ❤ 1
  • 🔥 1
Post #2897 3.52K
  • ❤ 3
  • 🤔 3
  • 🤩 1
Post #2896 3.55K
CHALLENGE

function* outer() {
yield 1;
yield* inner();
yield 4;
}

function* inner() {
yield 2;
yield 3;
}

const gen = outer();
console.log(gen.next().value);
console.log(gen.next().value);
console.log(gen.next().value);
console.log(gen.next().value);
  • 🔥 3
  • ❤ 2
  • 👍 1
Post #2895 3.6K
  • 👍 8
  • ❤ 2
  • 🤔 1
Post #2894 3.67K
CHALLENGE

const user = {
name: 'Sarah',
age: 28,
getName() {
return this.name;
}
};

const { getName } = user;
const boundGetName = user.getName.bind(user);

console.log(getName());
console.log(boundGetName());
console.log(user.getName());
  • ❤ 5
  • 🤔 2
Post #2893 3.71K
  • ❤ 3
  • 🤔 3
  • 👍 1
  • 🔥 1
Post #2892 3.79K
CHALLENGE

function* fibonacci() {
let a = 0, b = 1;
yield a;
yield b;
while (true) {
let next = a + b;
yield next;
a = b;
b = next;
}
}

const gen = fibonacci();
const results = [];
for (let i = 0; i < 6; i++) {
results.push(gen.next().value);
}
console.log(results.join(','));
  • ❤ 4
  • 👍 1
  • 🤔 1
Post #2891 3.74K
  • ❤ 6
  • 🤔 3
  • 🤣 2
Post #2890 3.63K
CHALLENGE

async function fetchData() {
return Promise.resolve('data');
}

async function processData() {
console.log('start');
const result = fetchData();
console.log(typeof result);
const data = await fetchData();
console.log(typeof data);
console.log('end');
}

processData();
  • ❤ 8
Post #2889 3.94K
  • ❤ 8
  • 👍 2
Post #2888 3.94K
CHALLENGE

class Vehicle {
#engine = 'V6';
static count = 0;

constructor(type) {
this.type = type;
Vehicle.count++;
}

static getCount() {
return this.count;
}

get info() {
return `${this.type} with ${this.#engine}`;
}
}

class Car extends Vehicle {
static count = 0;

constructor(brand) {
super('car');
this.brand = brand;
Car.count++;
}
}

const tesla = new Car('Tesla');
const ford = new Car('Ford');
console.log(Vehicle.getCount());
console.log(Car.getCount());
console.log(tesla.info);
  • ❤ 3
  • 👍 2
  • 🔥 1
Post #2887 3.82K
Happy New Year! 🎄 🍾

Wishing you fewer meetings, more merges, and no Friday deploys. 😆

@JavaScript Telegram Newsletter Team
  • ❤ 33
  • 👍 6
  • 🔥 4
Post #2886 3.84K
  • 🤣 10
  • ❤ 6
  • 👍 1
Post #2885 3.77K
Framework/lib of the year 🤔
  • ❤ 9
  • 🤔 4
  • 👍 1
Post #2884 4.55K
  • 👍 7
  • ❤ 3
  • 🔥 2
Post #2883 4.26K
Runtime of the year 🤔
  • ❤ 3
Post #2882 4.45K
  • 🔥 11
  • 👍 2
Post #2881 4.31K
CHALLENGE

function createCounter() {
let count = 0;
return function(increment = 1) {
count += increment;
return count;
};
}

const counter1 = createCounter();
const counter2 = createCounter();

console.log(counter1());
console.log(counter1(5));
console.log(counter2(3));
console.log(counter1());
console.log(counter2());
  • ❤ 4
  • 👍 1
  • 🔥 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 →