JavaScript
32K subscribers
1.04K photos
10 videos
33 files
717 links
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
Download Telegram
๐Ÿ‘€ 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
Please open Telegram to view this post
VIEW IN TELEGRAM
๐Ÿ‘4โค2๐Ÿ”ฅ1
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
What is the output?
Anonymous Quiz
37%
6
7%
30
54%
60
1%
10
๐Ÿค”37๐Ÿคฃ17๐Ÿ‘11โค3๐Ÿ”ฅ2
๐Ÿคจ 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
Please open Telegram to view this post
VIEW IN TELEGRAM
๐Ÿ‘8โค5๐Ÿ”ฅ1
CHALLENGE

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

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

console.log(numbers);
๐Ÿ‘1
๐Ÿ‘20๐Ÿคฃ7โค3๐Ÿ”ฅ3
๐Ÿฅถ 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
Please open Telegram to view this post
VIEW IN TELEGRAM
โค5๐Ÿ‘5๐Ÿ”ฅ4
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
๐Ÿค”27๐Ÿ‘7โค5๐Ÿ”ฅ1๐Ÿคฉ1
CHALLENGE

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

with (obj) {
var result = a + b;
}

console.log(result);
๐Ÿ”ฅ6๐Ÿ‘2๐Ÿค”2
๐Ÿค”16๐Ÿ‘12๐Ÿคฃ8โค3
๐Ÿคจ NodeBB v4.0.0 Released: Node.js Powered Forums

Now almost 12 years old, NodeBB continues to offer a classic forum experience in a modern Node.js-shaped guise. The big update for v4 is support for federation between NodeBB instances and the wider fediverse generally. Note that the open source project (repo) is GPL licensed with NodeBB Inc providing a hosted service.

NodeBB, Inc.
Please open Telegram to view this post
VIEW IN TELEGRAM
๐Ÿ‘7โค2๐Ÿ”ฅ1
CHALLENGE

const numbers = [2, 4, 6, 8, 10];

const allEven = numbers.every(function(num) {
return num % 2 === 0;
});

console.log(allEven);
๐Ÿ‘11โค2
What is the output?
Anonymous Quiz
81%
true
8%
undefined
7%
false
4%
TypeError
๐Ÿ”ฅ16๐Ÿ‘5๐Ÿค”2
๐Ÿ‘€ ArkType 2.0: Runtime Validation Library

An easy-to-deploy solution for schema validation that can infer TypeScript definitions 1:1 and use them as optimized validators for your data, both at runtime and for immediate type-level feedback in your editor.

ArkType
Please open Telegram to view this post
VIEW IN TELEGRAM
๐Ÿ‘9
CHALLENGE

const numbers = [10, 23, 45, 60, 78];
const isDivisibleByFive = numbers.some(num => num % 5 === 0);

if (isDivisibleByFive) {
console.log('Some numbers are divisible by 5');
} else {
console.log('No numbers are divisible by 5');
}
๐Ÿ‘11
๐Ÿ‘21โค3๐Ÿค”3๐Ÿ”ฅ2๐Ÿคฃ2
Please open Telegram to view this post
VIEW IN TELEGRAM
๐Ÿ‘11โค3๐Ÿค”3๐Ÿ”ฅ2๐Ÿคฉ1
๐Ÿ˜†
Please open Telegram to view this post
VIEW IN TELEGRAM
๐Ÿคฃ111๐Ÿ‘8๐Ÿค”3๐Ÿ”ฅ2โค1
CHALLENGE


const students = [
{ name: 'Alice', age: 20 },
{ name: 'Bob', age: 22 },
{ name: 'Charlie', age: 23 }
];

const studentToFind = { name: 'Bob', age: 22 };

const isIncluded = students.includes(studentToFind);

console.log(isIncluded);
๐Ÿ‘10โค1