JavaScript
32K subscribers
1.04K photos
10 videos
33 files
718 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
CHALLENGE

const a = '5';
const b = 5;
const c = 10;

const result1 = a == b;
const result2 = a === b;
const result3 = b < c;
const result4 = b >= c;

console.log(result1, result2, result3, result4);
πŸ‘9❀3
πŸ€”18πŸ‘7🀩7❀6
πŸ€” Which Rich Text Editor Framework Should You Choose in 2025?

A round-up of actively developed WYSIWYG editor options you can drop into your apps along with the pros and cons of each.

Dexemple and Rowny (Liveblocks)
Please open Telegram to view this post
VIEW IN TELEGRAM
πŸ‘5❀1πŸ”₯1πŸ€”1
CHALLENGE

let a = 5;
let b = a++ + ++a;
console.log(b);
🀣24πŸ”₯8πŸ‘5
What is the output?
Anonymous Quiz
37%
12
36%
11
10%
13
17%
10
πŸ€”38πŸ”₯15πŸ‘13🀣8❀2
πŸ‘ A Protracker Module Player in Pure JavaScript

I’m a sucker for 90s tracker music, JavaScript experiments, and cool Web experiences, and this has all three. If you’re not familiar with tracker music, it’s a way to write music on a grid which triggers the playing of samples. This code manages to parse and play a Protracker file in pure JavaScript. (Note: The image above is of the original Protracker app, this experiment is more minimal and about the code.)

srtuss
Please open Telegram to view this post
VIEW IN TELEGRAM
❀4πŸ‘3πŸ”₯1
CHALLENGE

'use strict';

function strictModeExample() {
undeclaredVariable = 10;
try {
console.log(undeclaredVariable);
} catch (e) {
console.log('Error:', e.message);
}
}

strictModeExample();
πŸ‘7🀣3❀2
CHALLENGE

function* numberGenerator() {
yield 1;
yield 2;
yield 3;
}

const gen = numberGenerator();
console.log(gen.next().value);
console.log(gen.next().value);
console.log(gen.next().value);
console.log(gen.next().value);
πŸ‘11❀2πŸ”₯1
πŸ‘5πŸ€”3
🀟 How to Publish ESM-Based npm Packages with TypeScript

Now that you can use the ES modules (almost) everywhere, it’s worth understanding how to package them up for use with npm. Axel digs into everything you need to know and shares some useful tools too.

Dr. Axel Rauschmayer
Please open Telegram to view this post
VIEW IN TELEGRAM
πŸ‘4❀3πŸ”₯1
CHALLENGE

const symbol1 = Symbol('symbol');
const symbol2 = Symbol('symbol');

const obj = {};
obj[symbol1] = 'value1';
obj[symbol2] = 'value2';

console.log(obj[symbol1]);
πŸ‘4
What is the output?
Anonymous Quiz
17%
undefined
11%
'value2'
10%
Error
62%
'value1'
πŸ‘8❀3πŸ”₯2
Please open Telegram to view this post
VIEW IN TELEGRAM
🀣23πŸ‘8❀4🀩1
CHALLENGE

function outerFunction() {
let x = 10;
function innerFunction() {
x += 5;
console.log(x);
}
return innerFunction;
}

const closureFunc = outerFunction();
closureFunc();
closureFunc();
πŸ€”12πŸ‘10
What is the output?
Anonymous Quiz
30%
10, 15
33%
15, 20
35%
15, 15
3%
20, 25
πŸ‘10πŸ€”9🀣4❀2
πŸ˜†
Please open Telegram to view this post
VIEW IN TELEGRAM
🀣89πŸ‘3🀩3
CHALLENGE

const promise = new Promise((resolve, reject) => {
reject('Error occurred');
});

promise
.then(() => {
console.log('Promise resolved!');
})
.catch(error => {
console.log(error);
})
.then(() => {
console.log('Process completed');
});
πŸ‘5πŸ”₯3
πŸ‘€ Style Observer: A Library to Observe CSS Property Changes

Lea Verou is a developer who’s easy to admire because whenever she sets out to solve a problem, the results are always fully formed with no cut corners. So it goes with this β€˜exhaustively tested’ JS library for observing changes to CSS properties which deftly handles lots of browser quirks. See the project homepage for more. (TIL there’s a .style TLD!)

Lea Verou
Please open Telegram to view this post
VIEW IN TELEGRAM
πŸ‘5πŸ€”4❀2