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

Older Posts 20 shown
Post #1991 6.68K
CHALLENGE

function getNextWeekday(dateString) {
const date = new Date(dateString);
const day = date.getDay();
const diff = (day === 0 ? 1 : 8) - day;
date.setDate(date.getDate() + diff);
return date.toDateString();
}

console.log(getNextWeekday('2023-10-20'));
  • ❀ 13
  • πŸ‘ 3
  • πŸ”₯ 3
  • πŸ€” 2
  • 🀩 1
Post #1990 7.05K
πŸ₯Ά 2ality – JavaScript and more

In order to feel more confident about my tsconfig.json, I decided to go through the tsconfig.json documentation, collect all commonly used options and describe them below...

Axel Rauschmayer
  • ❀ 5
  • πŸ‘ 5
  • πŸ”₯ 4
Post #1989 6.82K
  • πŸ‘ 20
  • 🀣 8
  • ❀ 3
  • πŸ”₯ 3
Post #1988 6.49K
CHALLENGE

function* numberGenerator() { 
for (let i = 0; i < 3; i++) {
yield i * 2;
}
}

const numbers = [...numberGenerator()];

console.log(numbers);
  • πŸ‘ 1
Post #1987 6.83K
🀨 Chess.js: A Library to Manage a Chess Game

Provides move generation, validation, piece placement, check/checkmate/stalemate detection – "everything but the AI!" v1.0 offers a rewrite to TypeScript and a variety of enhancements.

Jeff Hlywa
  • πŸ‘ 8
  • ❀ 7
  • πŸ”₯ 1
Post #1986 6.72K
  • πŸ€” 37
  • 🀣 17
  • πŸ‘ 12
  • ❀ 3
  • πŸ”₯ 2
Post #1985 6.43K
CHALLENGE

function trickyArgs(a, b, c) {
arguments[0] = 10;
arguments[1] = 20;
arguments[2] = 30;
console.log(a + b + c);
}
trickyArgs(1, 2, 3);
  • πŸ€” 18
  • πŸ‘ 7
  • ❀ 1
Post #1984 6.76K
πŸ‘€ Learn Yjs and Building Realtime Collaborative Apps in JavaScript

Yjs is a CRDT (Conflict-free replicated data type) library for building collaborative and local-first apps. CDRTs are powerful but can be tricky to β€˜get’ which is why this new interactive Yjs tutorial is so valuable. A great way to learn about building collaborative, syncing webapps from the ground up.

Jamsocket
  • πŸ‘ 4
  • ❀ 2
  • πŸ”₯ 1
Post #1983 6.27K
  • 🀣 16
  • πŸ€” 8
  • πŸ”₯ 4
  • ❀ 3
  • 🀩 2
  • πŸ‘ 1
Post #1982 6.27K
CHALLENGE

class Vehicle {
static type() {
return "Generic Vehicle";
}
}

class Car extends Vehicle {
static type() {
return "Car";
}
}

console.log(Car.type());
  • πŸ‘ 11
  • ❀ 1
Post #1980 6.9K
  • πŸ‘ 13
  • πŸ€” 12
  • ❀ 5
  • πŸ”₯ 2
  • 🀣 1
Post #1979 6.55K
CHALLENGE

function multiply(a, b = a * 2) {
return a * b;
}

console.log(multiply(3));
  • πŸ‘ 10
  • πŸ”₯ 4
Post #1978 7.07K
🀟 A New Chapter for Express.js

2024 saw the still-extremely-popular Express project awaken from a slumber, of sorts, with work being made to update things to modern standards, a security audit, and the release of Express v5. Here, the team explains what’s been going on behind the scenes to get Express back on the tracks, as well as a β€œbold vision for 2025.”

Express Technical Committee
  • ❀ 11
  • πŸ‘ 4
  • πŸ”₯ 2
Post #1977 6.35K
  • πŸ‘ 24
  • 🀣 14
  • πŸ”₯ 7
  • πŸ€” 5
  • ❀ 1
Post #1976 6.56K
CHALLENGE

const a = '10';
const b = 20;
const c = '30.5';

const result = Number(a) + b + Number.parseFloat(c);

console.log(result);
  • πŸ‘ 4
  • ❀ 2
Post #1975 7.02K
❄️ The 'WinterCG' Web Interoperable Runtimes Community Group, an effort to promote standards around runtime interoperability of JavaScript runtimes, has moved to Ecma International and is now known as WinterTC (TC55).
  • ❀ 4
  • πŸ‘ 2
  • πŸ”₯ 2
Post #1974 6.99K
  • πŸ‘ 22
  • πŸ”₯ 8
  • πŸ€” 5
  • 🀣 5
  • ❀ 2
Post #1973 6.68K
CHALLENGE

let str = "Hello, World!";
let result = str.substring(7, 12);
console.log(result);
  • πŸ‘ 6
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 β†’