JavaScript @javascript Channel on Telegram

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

JavaScript (English)

Are you passionate about JavaScript? Do you want to stay updated on the latest news, articles, books, and updates in the world of #javascript? Look no further than our resourceful newsletter - JavaScript! This channel is dedicated to providing you with valuable information about everything related to JavaScript, so you never miss out on any important updates. We also offer fun quizzes to test your knowledge and engage with other members of the community. Join us today and be part of the conversation! Let's chat and learn together at @nairihar. Don't miss out on the opportunity to expand your JavaScript knowledge and network with like-minded individuals. Stay informed, stay connected with JavaScript!

JavaScript

16 Feb, 13:15


โœŒ๏ธ๐Ÿฅถ Ohm: A Parsing Toolkit for JavaScript and TypeScript

Itโ€™s been a few years since we covered this project and itโ€™s come along a lot. Itโ€™s a library for building PEG-based parsers you can use in interpreter, compilers, analysis tools, etc. and you can even play with its grammar online.

Warth, Dubroy, et al.

JavaScript

16 Feb, 06:31


CHALLENGE


let weakmap = new WeakMap();

let obj1 = {};
let obj2 = {};

weakmap.set(obj1, 'value1');
weakmap.set(obj2, 'value2');

obj1 = null;

console.log(weakmap.has(obj1));

JavaScript

15 Feb, 13:14


๐Ÿ‘€ 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

JavaScript

15 Feb, 06:33


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');
});

JavaScript

14 Feb, 15:51


๐Ÿ˜†

JavaScript

14 Feb, 06:32


CHALLENGE

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

const closureFunc = outerFunction();
closureFunc();
closureFunc();

JavaScript

13 Feb, 13:56


๐Ÿ˜† Elon Musk attempts hostile takeover of OpenAIโ€ฆ

Fireship

JavaScript

13 Feb, 06:33


CHALLENGE

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

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

console.log(obj[symbol1]);

JavaScript

12 Feb, 13:54


๐ŸคŸ 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

JavaScript

12 Feb, 06:35


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);

JavaScript

11 Feb, 06:34


CHALLENGE

'use strict';

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

strictModeExample();

JavaScript

10 Feb, 13:06


๐Ÿ‘ 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

JavaScript

10 Feb, 06:34


CHALLENGE

let a = 5;
let b = a++ + ++a;
console.log(b);

JavaScript

09 Feb, 13:05


๐Ÿค” 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)

JavaScript

09 Feb, 06:35


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);

JavaScript

05 Feb, 06:34


CHALLENGE

const numbers = [1, 2, 3, 4, 5];

const result = numbers
.filter(n => n % 2 === 0)
.map(n => n * 2)
.reduce((acc, n) => acc + n, 0);

console.log(result);

JavaScript

04 Feb, 13:32


๐Ÿ˜ฑ jscanify 1.3: JavaScript Document Scanning Library

Given raw photos of documents, this can do paper detection (along with glare suppression), distortion correction, highlighting and extracting. See some visual examples or try it out here.

ColonelParrot

JavaScript

04 Feb, 06:34


CHALLENGE

const wm = new WeakMap();
const obj1 = {};
const obj2 = {};
wm.set(obj1, 'object 1');
wm.set(obj2, 'object 2');
wm.delete(obj1);
console.log(wm.has(obj1));

JavaScript

03 Feb, 13:31


๐Ÿคจ docxtemplater: Generate docx and pptx Documents from Templates

Generate Word and PowerPoint files dynamically by merging against templates (ideal for invoices, contracts, certificates, etc.) Itโ€™s open source (MIT or GPLv3), but the creator has a commercial version with more extensions (e.g. to work with Excel). GitHub repo and feature demos.

Edgar Hipp

JavaScript

03 Feb, 06:34


CHALLENGE


let symbol1 = Symbol('description');
let symbol2 = Symbol('description');

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

console.log(obj[symbol1]);
console.log(symbol1 === symbol2);

JavaScript

02 Feb, 12:30


๐ŸคŸ The Modern Way to Write JavaScript Servers

The irony is that while Node popularized JavaScript on the server (though Netscape was doing it in the 90s) this modern, standardized cross-runtime approach doesnโ€™t work on Node ...yet ;-)

Marvin Hagemeister

JavaScript

02 Feb, 06:35


CHALLENGE

function tricky() {
let a = 1;
let b = 2;
const result = (function(a) {
a = 3;
return a + b;
})(a);
return result;
}

console.log(tricky());

JavaScript

01 Feb, 06:34


CHALLENGE

function mysteriousFunction(a) {
let result = 0;
for (let i = 1; i <= a; i++) {
if (i % 3 === 0 && i % 5 === 0) {
result += i * 2;
} else if (i % 3 === 0) {
result += i;
} else if (i % 5 === 0) {
result -= i;
}
}
return result;
}

console.log(mysteriousFunction(15));

JavaScript

31 Jan, 18:40


๐Ÿค” Things People Get Wrong About Electron

A long-time maintainer of the wildly successful Electron cross-platform app framework stands by the technical choices Electron has made over the years and defends it against some of the more common criticisms here.

Felix Rieseberg

JavaScript

31 Jan, 06:34


CHALLENGE

function mystery(x) {
return (function(y) {
return x + y;
})(x * 2);
}

const result1 = mystery(2);
const result2 = mystery(5);
const result3 = mystery(-1);

console.log(result1, result2, result3);

JavaScript

30 Jan, 13:32


๐Ÿ”ฅ DeepSeek stole our tech... says OpenAI

Fireship

JavaScript

30 Jan, 06:33


CHALLENGE

function trickyCount(n) {
if (n <= 1) return n;
return trickyCount(n - 1) + trickyCount(n - 2);
}

function wrapCount(n) {
return trickyCount(n) - trickyCount(n - 4);
}

console.log(wrapCount(6));

JavaScript

29 Jan, 13:39


โ›ฝ๏ธ A Failed Attempt to Shrink All npm Packages by 5%

What if you could shrink all npm package sizes by 5%.. wouldnโ€™t that benefit all of us? Hereโ€™s how one developer did just that using Zopfli compression and then made a proposal to the npm maintainers to implement it. While promising, the proposal was ultimately rejected due to a variety of challenges and trade-offs, such as slower publishing speeds. Nonetheless, itโ€™s a good story packed with things to learn from.

Evan Hahn

JavaScript

29 Jan, 06:32


CHALLENGE

var arr = Array.from({ length: 5 }, (v, i) => i * 2);
console.log(arr);

JavaScript

28 Jan, 13:06


๐Ÿคจ deck.gl 9.1: GPU-Powered Large Scale Data Visualization

deck.gl provides a way to create complex yet high performance data visualizations composed of multiple layers (examples). It can be used in a vanilla JS way or through React components and itโ€™s ready for WebGPU.

OpenJS Foundation

JavaScript

28 Jan, 06:31


CHALLENGE

const person = {
name: "Alice",
age: 30,
city: "New York"
};

const keys = Object.keys(person);
const values = Object.values(person);

const result = keys.map((key, index) => `${key}: ${values[index]}`);

console.log(result);

JavaScript

27 Jan, 13:04


๐Ÿ•’ JavaScript Temporal is Coming (For Real!)

We first mentioned the Temporal API proposal providing a better way to handle dates and times in JavaScript almost five years ago (in issue 496!) but now it really is almost here. Brian explains its basic concepts and where initial support is starting to appear.

Brian Smith

JavaScript

27 Jan, 06:34


CHALLENGE

let arr = [1, 2, 3, 4, 5];
arr.length = 3;
console.log(arr.length);
console.log(arr);

JavaScript

26 Jan, 13:03


๐ŸŒŸ Bun 1.2: A Big Step Forward for the Fast JS/TS Runtime

The JavaScriptCore-based Bun continues to up its server-side runtime game with strides forward in Node.js compatibility, performance boosts, and new APIs for interacting with S3 and S3-like object stores as well as Postgres. If youโ€™d prefer to be ๐Ÿ˜‰ introduced to Bun 1.2 with a keynote-style video, it's a good watch.

Ashcon Partovi and the Bun Team

JavaScript

26 Jan, 06:34


CHALLENGE


let arr = [1, 2, 3, 4, 5];
arr.length = 3;
arr.push(6, 7);
console.log(arr.length);

JavaScript

25 Jan, 13:47


๐Ÿ”ฅ After over a decade of Cracking the Coding Interview being the go-to resource for technical interview prep, itโ€™s time for the SEQUEL. Iโ€™m thrilled to announce the release of Beyond Cracking the Coding Interview, packed with strategies and tools to tackle tough interview questions. What CtCI introduced BCtCI dives deep into, and adds in loads of new content like triggers and problem-solving boosters.

Gayle McDowell

JavaScript

25 Jan, 06:32


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);

JavaScript

24 Jan, 19:29


๐Ÿ˜†

JavaScript

24 Jan, 13:56


๐Ÿคจ This free Chinese AI just crushed OpenAI's $200 o1 model...

Fireship

JavaScript

24 Jan, 06:34


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');
}

JavaScript

23 Jan, 13:52


๐Ÿ‘€ 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

JavaScript

23 Jan, 06:32


CHALLENGE

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

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

console.log(allEven);

JavaScript

22 Jan, 13:51


๐Ÿคจ 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.

JavaScript

22 Jan, 06:31


CHALLENGE

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

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

console.log(result);

JavaScript

21 Jan, 06:33


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'));

JavaScript

20 Jan, 13:45


๐Ÿฅถ 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

JavaScript

20 Jan, 06:32


CHALLENGE

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

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

console.log(numbers);

JavaScript

19 Jan, 13:43


๐Ÿคจ 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

JavaScript

19 Jan, 06:33


CHALLENGE

function trickyArgs(a, b, c) {
arguments[0] = 10;
arguments[1] = 20;
arguments[2] = 30;
console.log(a + b + c);
}
trickyArgs(1, 2, 3);

JavaScript

18 Jan, 13:42


๐Ÿ‘€ 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

JavaScript

18 Jan, 06:33


CHALLENGE

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

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

console.log(Car.type());

JavaScript

17 Jan, 13:26


๐Ÿ˜Ž Node Web Audio API 1.0: A Web Audio API Implementation for Node

More accurately, itโ€™s a set of Node bindings for a Rust-powered non-browser implementation of the Web Audio API.

IRCAM โ€“ Centre Pompidou

JavaScript

17 Jan, 06:35


CHALLENGE

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

console.log(multiply(3));

JavaScript

16 Jan, 13:05


๐ŸคŸ 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

JavaScript

16 Jan, 06:33


CHALLENGE

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

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

console.log(result);

JavaScript

15 Jan, 13:02


โ„๏ธ 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).

JavaScript

15 Jan, 06:31


CHALLENGE

let str = "Hello, World!";
let result = str.substring(7, 12);
console.log(result);

JavaScript

14 Jan, 13:02


๐Ÿ‘ˆ Tagify 4.33: An Elegant Input Component for Tags

The polished demos show a lot of effort has been put in here. GitHub repo.

Yair Even-Or

JavaScript

14 Jan, 06:34


CHALLENGE

function displayArguments() {
console.log(arguments.length);
console.log(arguments[0]);
console.log(arguments[2]);
}

displayArguments('Hello', 'World', 'JavaScript', 'Quiz');

JavaScript

13 Jan, 13:05


๐Ÿ“„ Play Tetris in a PDF File

I'll let you decide if this one is fun or frightening! Whether or not this will work depends on your PDF reader or browser support, but it works with Chrome and Firefox, at least.

The PDF document format supports embedded JavaScript and this experiment uses it to implement a game of Tetris. The developer, Thomas Rinsma, has used Python to output the PostScript that includes the game's JavaScript. Couple that with the fact many browser PDF renderers are themselves implemented in JavaScript (e.g. PDF.js) and you have a veritable Matryoshka doll of technologies at play here.

JavaScript

13 Jan, 06:35


CHALLENGE

function trickyFunction() {
let a = 5;
let b = '5';
let c = 5;

if (a == b && b === c) {
console.log('Condition 1');
} else if (a === c || b == c) {
console.log('Condition 2');
} else {
console.log('Condition 3');
}
}

trickyFunction();

JavaScript

12 Jan, 09:02


๐Ÿ‘€ PostalMime: A Universal Email Parsing Library

An email parsing library happy in most JS runtimes. Takes the raw source of emails and parses them into their constituent parts.

Postal Systems

JavaScript

12 Jan, 06:31


CHALLENGE

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

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

console.log(result);

JavaScript

11 Jan, 16:51


โญ 2024's JavaScript Rising Stars

Itโ€™s time to fully wave goodbye to 2024, but not before Michael Rambeauโ€™s annual analysis of which JavaScript projects fared best on GitHub over the past year. Even if you dislike GitHub stars as a metric for anything, this remains a great way to get a feel for the JavaScript ecosystem and see what libraries and tools have mindshare in a variety of niches. A fantastic roundup as always.

Michael Rambeau

JavaScript

11 Jan, 06:32


CHALLENGE

const myObject = {
a: 1,
b: 2,
c: 3,
[Symbol.iterator]: function* () {
for (let key of Object.keys(this)) {
yield this[key];
}
}
};

const iter = myObject[Symbol.iterator]();
console.log(iter.next().value);
console.log(iter.next().value);
console.log(iter.next().value);

JavaScript

10 Jan, 06:32


CHALLENGE

function* customGenerator() {
yield 'Hello';
yield 'World';
return 'Done';
}

const gen = customGenerator();
console.log(gen.next().value);
console.log(gen.next().value);
console.log(gen.next().value);

JavaScript

09 Jan, 06:32


CHALLENGE

const mySet = new Set();
mySet.add(10);
mySet.add(20);
mySet.add(10);
mySet.add(30);

console.log(mySet.size);

JavaScript

08 Jan, 06:32


CHALLENGE

const WM = new WeakMap();
let obj = {};
let anotherObj = {};
WM.set(obj, 'object data');
WM.set(anotherObj, 'another object data');
obj = null;

// Let's check what's logged
console.log(WM.has(obj));
console.log(WM.has(anotherObj));

JavaScript

07 Jan, 13:16


๐Ÿ˜ข

JavaScript

07 Jan, 06:33


CHALLENGE

async function fetchData() {
let data = 'initial';

const promise = new Promise((resolve) => {
setTimeout(() => {
resolve('fetched');
}, 1000);
});

promise.then((result) => {
data = result;
});

return data;
}

fetchData().then(console.log);

JavaScript

06 Jan, 13:29


๐Ÿ”ฅ The amazing, but unsettling future of technology...

Fireship

JavaScript

06 Jan, 06:32


CHALLENGE

function trickyFunction() {
var obj = { a: 1 };
var anotherObj = obj;
obj.a = 2;
obj = { a: 3 };
anotherObj.a = 4;
return obj.a + anotherObj.a;
}

console.log(trickyFunction());

JavaScript

05 Jan, 13:25


๐ŸŒฆ awesome-nest-boilerplate

This is an ever-evolving, very opinionated architecture and dev environment for new node projects using NestJS.

NarHakobyan

JavaScript

05 Jan, 06:32


CHALLENGE

function trickyFunction() {
var x = 10;
if (x > 5) {
let y = x * 2;
x = y;
}
return x;
}

console.log(trickyFunction());

JavaScript

04 Jan, 12:26


๐ŸŒฆ awesome-nest-schematics

Awesome Nest Boilerplate architecture element generation based on Angular schematics ๐ŸŽฌ

NarHakobyan

JavaScript

04 Jan, 06:35


CHALLENGE

function trickyFunction() {
var a = 10;
var b = a;
b = 15;

const obj1 = { x: 1 };
const obj2 = obj1;
obj2.x = 5;

console.log(a + ' ' + b + ' ' + obj1.x);
}

trickyFunction();

JavaScript

03 Jan, 06:30


CHALLENGE


const obj = {
valueOf() {
return 42;
}
};

const result = obj + 8;
console.log(result);

JavaScript

02 Jan, 06:31


CHALLENGE


function combine(...arrays) {
return arrays.reduce((acc, arr) => [...acc, ...arr], []);
}

const result = combine([1, 2], [3, 4], [5, 6]);
console.log(result);

JavaScript

31 Dec, 20:03


๐Ÿฅ‚ Let's rock the 2025!

JavaScript

28 Dec, 08:31


๐ŸคŸ Node.js Weekly #560 - last report

A look back at Node's 2024

2024 has been a solid year for Node, with the release of Node.js v22 back in April (now in LTS) and v23 in October. Node also got a new mascot this year (above), Express 5.0 arrived, Node has dabbled with type stripping to better support TypeScript, and a native SQLite module has been under active development. Fingers crossed for an interesting 2025!

JavaScript

27 Dec, 06:29


โœŒ๏ธ JavaScript Weekly #โ€‹717 - last report

JavaScript

27 Dec, 05:51


๐Ÿ™ You can support us via crypto

๐Ÿค‘ (TON) UQBUbmofBcohb5Ix5lYjTEz3IH8aVBg8go_KpgeTJTJz21d2

๐Ÿค‘ (TRC 20) TE9wDkNdnTtrzbk3tqWyTgt2zK3byUqH79

Or just buy us a coffee โ˜•๏ธ

JavaScript

25 Dec, 12:48


You can also provide free-text feedback about your opinion by simply submitting it here.

JavaScript

25 Dec, 12:48


๐Ÿ™We would like to hear your feedback!

JavaScript

24 Dec, 14:00


๐Ÿฅฐ

JavaScript

22 Dec, 06:00


๐Ÿ˜† We think the answer is clear, but ...

JavaScript

20 Dec, 06:00


๐Ÿ˜ƒ We are waiting for your honest answer.

JavaScript

18 Dec, 06:00


๐Ÿ˜ˆ Let's see how the market was this year!

JavaScript

16 Dec, 06:00


๐Ÿ‘ Share your experience with the community

JavaScript

16 Dec, 05:01


Starting today until December 31, weโ€™ll be wrapping up the year with surveys and celebrations! ๐ŸŽ‰

During this time, weโ€™ll pause posting JavaScript updates to focus on reflecting and celebrating together. Thank you for your understanding, and we wish you and your families a joyful and peaceful holiday season! ๐ŸŽ„

JavaScript

15 Dec, 13:31


๐ŸคŸ The State of Node.js Performance in 2024

A thorough set of benchmarks covering recent performance advancements made in Node.js. The improvements between Node 18 and 20 up to version 22 might surprise you - itโ€™s clear the team has put a lot of work into this area.

Gonzaga and Parody (NodeSource)

JavaScript

15 Dec, 06:30


CHALLENGE

let a = 5; // binary: 101
let b = 3; // binary: 011

let result = a ^ b;

console.log(result);

JavaScript

14 Dec, 13:30


โœŒ๏ธ Boa v0.20: An Alternative JavaScript Compiler

Under development for several years, Boa has a few missions: be a Rust ECMAScript implementation, be easy to embed in Rust projects, and be a fast, safe JS engine overall. v0.20 sees a bump up to 89.92% compliance in the Test262 suite, improves Temporal support, adds Atomics.pause, and more. This is no toy engine.

Boa Developers

JavaScript

09 Dec, 13:45


๐Ÿฅถ Four Talks from the London TypeScript Meetup โ€“ All top notch talks.

Bloomberg

JavaScript

09 Dec, 06:30


CHALLENGE โ“


class MyClass {
constructor() {
this.a = 10;
}
}
MyClass.prototype.b = 20;
const obj = new MyClass();
delete obj.b;
console.log(obj.b);

JavaScript

08 Dec, 13:43


๐Ÿ‘ Linkify 4.2: Link Up URLs, Emails, and More in Plain Text

Given plain text containing things like links, hashtags, IP addresses, and email addresses, this will generate the correct code to display it on the Web.

Hypercontext

JavaScript

08 Dec, 06:30


CHALLENGE โ“


const map = new Map();
map.set("key", undefined);
console.log(map.has("key"), map.get("key"));

JavaScript

07 Dec, 13:44


โœŒ๏ธ JS weekly #โ€‹715

JavaScript

07 Dec, 06:30


CHALLENGE โ“

const obj = {
0: "zero",
1: "one",
length: 2
};
console.log(Array.from(obj));

JavaScript

06 Dec, 13:38


โšก๏ธ test262.fyi presents an interesting technical view of how different JavaScript engines fare on the official ECMAScript conformance test suite.

JavaScript

06 Dec, 06:31


CHALLENGE โ“


function foo() {}
foo.prototype.bar = 42;
const obj = new foo();
foo.prototype = { bar: 100 };
console.log(obj.bar);

JavaScript

05 Dec, 13:36


๐Ÿ‘ Porffor

Porffor compiles JavaScript ahead-of-time to WebAssembly and native binaries.

JavaScript

05 Dec, 06:30


CHALLENGE โ“


(async function() {
return await 10;
})().then(console.log);

JavaScript

04 Dec, 13:35


๐Ÿ‘€ Skia Canvas 2.0: A Browserless Canvas Environment for Node

Based on Googleโ€™s Skia graphics engine and offers end results similar to Chromeโ€™s own canvas system. Itโ€™s GPU accelerated and can render images, paths, fonts, shapes, and (almost) everything youโ€™d expect. v2.0 adds support for WOFF/WOFF2 fonts, WEBP exporting, and more.

Christian Swinehart

JavaScript

04 Dec, 06:30


CHALLENGE โ“


const nums = [1, 2, 3];
const res = nums.reduce((acc, val) => acc + val, "");
console.log(typeof res);

JavaScript

03 Dec, 13:02


๐Ÿ‘ป Sketchy Stanford study says 9.5% of programmers are "ghosts"...


Fireship

JavaScript

02 Dec, 15:32


โœŒ๏ธ๐ŸคŸ Math.js 14.0: An Extensive Math Library for Node and Browsers

Work with complex numbers, fractions, units, matrices, symbolic computation, etc. A long standing library now, but continuing to get frequent updates. GitHub repo.

Jos de Jong

JavaScript

02 Dec, 07:01


CHALLENGE โ“


const obj = {
a: 1,
b: function() {
return this.a;
}
};
const b = obj.b;
console.log(b());

JavaScript

01 Dec, 14:30


๐Ÿ’ป Deno v. Oracle: Cancelling the JavaScript Trademark

Did you know Oracle formally owns the โ€˜JavaScriptโ€™ trademark? There have been a few efforts to change this over the years (most recently via this open letter) but Oracle isnโ€™t listening. The Deno team has now formally filed a petition to cancel the trademark which Deno claims is fradulent because Oracle used screenshots of Node.js, a project Oracle doesnโ€™t even own, as evidence of the trademarkโ€™s use.

Deno

JavaScript

01 Dec, 06:30


CHALLENGE โ“


console.log(0.1 + 0.2 === 0.3);

JavaScript

30 Nov, 13:35


โž• Math.js 14.0: An Extensive Math Library for Node and Browsers

Work with complex numbers, fractions, units, matrices, symbolic computation, etc. A long standing library now, but continuing to get frequent updates. GitHub repo.

Jos de Jong

JavaScript

30 Nov, 06:30


CHALLENGE โ“


const obj = { a: 1 };
Object.seal(obj);
obj.b = 2;
console.log(obj.b);

JavaScript

29 Nov, 14:03


๐Ÿค” Cheaters are breaking the technical interview... how?

Fireship

JavaScript

29 Nov, 06:30


CHALLENGE โ“


const arr = [1, 2];
arr.length = 0;
console.log(arr[0]);

JavaScript

28 Nov, 13:25


โœŒ๏ธ JavaScript weekly #714

JavaScript

28 Nov, 09:51


๐Ÿ˜†

JavaScript

28 Nov, 06:30


CHALLENGE โ“


const obj = {};
Object.defineProperty(obj, "prop", {
value: 42,
writable: false
});
obj.prop = 100;
console.log(obj.prop);

JavaScript

27 Nov, 13:24


๐Ÿ‘€ Viselect: Let Users Visually Select DOM Elements

If youโ€™ve got a variety of elements and you want users to be able to select them in groups, individually, or even in multiple groups, this lets you offer that functionality easily. Can be used in a vanilla fashion or with integrations for P/React or Vue.js.

Simon Reinisch

JavaScript

27 Nov, 06:30


CHALLENGE โ“


const x = (() => {
try {
return 10;
} finally {
return 20;
}
})();
console.log(x);

JavaScript

26 Nov, 13:23


โœŒ๏ธ Importing a Frontend JavaScript Library Without a Build System

Many developers prefer to eschew complex, modern build processes and use JavaScript in a more old-school way. You can definitely get by without a build system, and Julia explores some ways to import libraries in such a setup.

Julia Evans

JavaScript

26 Nov, 06:30


CHALLENGE โ“


const arr = [1, 2, 3];
arr[-1] = 10;
console.log(arr.length, arr[-1]);

JavaScript

25 Nov, 09:44


๐Ÿ˜†

JavaScript

24 Nov, 12:30


๐Ÿ˜‰ Microsoft Notepad.exe is overpowered nowโ€ฆ and 13 other major updates for devs

Fireship

JavaScript

23 Nov, 07:48


โ›ฝ๏ธ npmpackage.info: Detailed Package Info on a Single Page

Give this online tool the name of an npm package and you get a quick โ€˜dashboardโ€™ style view of the projectโ€™s main statistics, covering areas like quality scores, commits, open issues, releases, bundle size, and more.

Shrinath Nayak

JavaScript

22 Nov, 07:49


๐Ÿ’ฌ Discordeno v19: A Powerful Discord API Library

A long standing way to work with, and build bots for, the popular Discord chat system. v19 is a big update with breaking changes.

Discordeno Team

JavaScript

22 Nov, 06:30


CHALLENGE โ“

const obj = {
valueOf: () => 42,
toString: () => "Hello"
};
console.log(`${obj}`, obj + 10);

JavaScript

21 Nov, 07:55


๐ŸŒ• The plan to break apart Google... RIP Chrome


Fireship

JavaScript

20 Nov, 07:47


๐ŸคŸ AWS Lambda Turns Ten: Looking Back and Looking Ahead

AWS Lambda, Amazonโ€™s cloud function service, essentially launched the term โ€˜serverlessโ€™ and had a big impact on the use of Node.js in the cloud with Node v0.10 being the first and only runtime supported (till Java was added a year later).

Jeff Barr (AWS)

JavaScript

18 Nov, 05:02


๐Ÿ‘ Lexical 0.20: An Easy-to-Extend Text Editor Framework from Meta

A text editor framework built by Meta with extensibility, accessibility, and cross platform support in mind (thereโ€™s even a Swift variant for iOS). Thereโ€™s a live playground if you want to give it a try. React support is first class, but it can be adapted to work elsewhere (as with svelte-lexical).

Meta / Facebook

JavaScript

17 Nov, 12:02


โœŒ๏ธ JavaScript Import Attributes (ES2025) Explained

Import Attributes (now at stage 4 at TC39 and already supported in some runtimes) add a way to supply useful metadata about modules youโ€™re importing.

Trevor I. Lasn

JavaScript

17 Nov, 06:30


CHALLENGE โ“


console.log([โ€ฆ({ [Symbol.iterator]: function*(){ yield *[1, yield *[2,3] ] } })])

JavaScript

16 Nov, 11:58


๐Ÿ‘€ Component Party: A Rosetta Stone of UI Libraries

A long-standing comparison of many different frameworks (like React, Vue, Svelte, Angular, Qwik, Solid.js, etc.) by way of simple code snippets to perform various tasks. Now including Svelte 5 and Angular 17/Renaissance.

Mathieu Schimmerling

JavaScript

16 Nov, 06:31


CHALLENGE โ“


Number.prototype[Symbol.iterator] = function*() { yield *['a','b','c'] };
console.log([...1]);

JavaScript

15 Nov, 04:56


๐Ÿ˜‰ A day in the life of an iJS Conference Speaker | Munich 2024

Nairi Harutyunyan (nairihar)

JavaScript

14 Nov, 06:31


CHALLENGE โ“


console.log([..."hello"]);

JavaScript

13 Nov, 15:47


๐ŸคŸ Node.js weekly #โ€‹555

JavaScript

13 Nov, 06:30


CHALLENGE โ“


const obj = {
a: 1,
b: 2,
a: 3
};
console.log(obj.a);

JavaScript

12 Nov, 13:49


โœŒ๏ธ If you are at the iJS Conference in Munich this week, letโ€™s chat!

Nairi (@nairihar)

JavaScript

12 Nov, 13:43


๐Ÿ˜‚

JavaScript

12 Nov, 06:30


CHALLENGE โ“


const arr = [1, 2, 3];
arr[10] = 11;
console.log(arr.length);

JavaScript

11 Nov, 14:15


๐Ÿ˜†

JavaScript

11 Nov, 06:30


CHALLENGE โ“


const name = "Alice";
const obj = {
name: "Bob",
getName() {
return this.name;
}
};

console.log(obj.getName.call({ name: "Charlie" }));

JavaScript

10 Nov, 13:06


โœŒ๏ธ JavaScript Weekly #โ€‹712

JavaScript

10 Nov, 06:30


CHALLENGE โ“


const sym1 = Symbol("id");
const sym2 = Symbol("id");
console.log(sym1 === sym2);

JavaScript

09 Nov, 13:05


โ›ฝ๏ธ npmpackage.info: Detailed Package Info on a Single Page

Give this online tool the name of an npm package and you get a quick โ€˜dashboardโ€™ style view of the projectโ€™s main statistics, covering areas like quality scores, commits, open issues, releases, bundle size, and more.

Shrinath Nayak

JavaScript

09 Nov, 06:30


CHALLENGE โ“


let name = "Alice";
(function() {
let name = "Bob";
console.log(name);
})();
console.log(name);

JavaScript

08 Nov, 13:03


โœŒ๏ธ JavaScript's ??= Operator: Default Values Made Simple

The ??= nullish coalescing assignment operator snuck into JavaScript a few years ago via ECMAScript 2021 and has been broadly supported almost everywhere for ages. Trevor shows off how it can tighten up your assignments here.

Trevor I. Lasn

JavaScript

08 Nov, 06:30


CHALLENGE โ“


console.log(typeof typeof 42);

JavaScript

07 Nov, 13:54


๐ŸคŸ Node.js weekly #โ€‹554

JavaScript

07 Nov, 06:30


CHALLENGE

const arr = [1, 2, 3];
const copy = [...arr];
copy.push(4);

console.log(arr);
console.log(copy);

JavaScript

06 Nov, 13:53


๐ŸคŸ Why Code Security Matters - Even in Hardened Environments

A nicely diagrammed deep dive (and it really is deep) into a technique that allows malicious parties to turn a file write vulnerability in a Node app into a remote code execution exploit even when the file system is mounted read-only.

Stefan Schiller (Sonar)

JavaScript

06 Nov, 06:30


CHALLENGE

async function test() {
return (await Promise.resolve(0)) || 10;
}

test().then(console.log);

JavaScript

05 Nov, 13:24


๐Ÿซก Faker 9.1: Generate Fake, Realistic Data on Demand

Names, bios, addresses, zip codes, dates, monetary amounts, transactions, and a lot more besides. I really like the guided DevTools console based demo you can try โ€“ an idea other projects should consider. GitHub repo.

Faker.js Team

JavaScript

05 Nov, 06:30


CHALLENGE

const obj = { value: 10 };
const result = (obj.value += 5) && obj.value;
console.log(result);

JavaScript

04 Nov, 13:44


๐ŸŒฒ Tinybench 3.0: A Tiny, Simple Benchmarking Library

Uses whatever precise timing capabilities are available (e.g. process.hrtime or peformance.now). You can then benchmark whatever functions you want, specify how long or how many times to benchmark for, and get a variety of stats in return. GitHub repo.

Tinylibs

JavaScript

04 Nov, 06:30


CHALLENGE

const factorial = (function () {
const cache = {};
return function inner(n) {
if (n in cache) return cache[n];
return (cache[n] = n <= 1 ? 1 : n * inner(n - 1));
};
})();

console.log(factorial(5));
console.log(factorial(5));

JavaScript

03 Nov, 13:22


๐ŸŒช Python Jumps to #1 on GitHub Over JavaScript, But...

GitHub Universe took place this week, flooding us with data about how folks are using the platform. Of interest to those on social media was that Python has taken JavaScript's #1 language crown, though many argued that TypeScript (now #3) made an impact here. In positive news, JS still ranks first for code pushes alone and there's been a 15% jump in npm package consumption in the past year.

GitHub

JavaScript

03 Nov, 06:30


CHALLENGE

function Person(name) {
this.name = name;
this.sayName = () => console.log(this.name);
}

const person1 = new Person('David');
const person2 = { name: 'Not David', sayName: person1.sayName };

person2.sayName();

JavaScript

02 Nov, 13:08


this was in 2017, and it was only for the landing page

JavaScript

02 Nov, 06:30


CHALLENGE

const a = false || 0 || "" || null || "JavaScript";
console.log(a);

JavaScript

01 Nov, 13:23


โœŒ๏ธ JavaScript weekly #โ€‹711

JavaScript

01 Nov, 06:30


CHALLENGE

const obj = { a: 10 };
console.log(obj.a && obj.b || 20);

JavaScript

31 Oct, 13:21


โœŒ๏ธ JavaScript performance is weird... Write scientifically faster code with benchmarking


Beyond Fireship

JavaScript

31 Oct, 06:30


CHALLENGE

function memoize(fn) {
const cache = {};
return (arg) => cache[arg] ?? (cache[arg] = fn(arg));
}

const square = memoize((n) => n * n);

console.log(square(5));
console.log(square(5));
console.log(square(6));

JavaScript

30 Oct, 13:43


๐ŸคŸ Transformers.js v3: Now You Can Run Transformers in Node.js

A JavaScript port of Hugging Faceโ€™s transformers Python library that makes it possible to run natural language, vision, and audio machine learning models. v3 adds WebGPU support and now supports Node (plus Deno and Bun) as well as the browser. 1200+ models are ready to run in areas like embeddings, text generation, and speech recognition (as with whisper-small).

Hugging Face

JavaScript

30 Oct, 06:30


CHALLENGE

console.log('A');

setTimeout(() => console.log('B'), 0);

Promise.resolve()
.then(() => {
console.log('C');
return Promise.resolve();
})
.then(() => console.log('D'));

console.log('E');

JavaScript

29 Oct, 13:07


๐Ÿ‘€ A neat way to find and tidy unused stuff in your projects

Knip finds unused files, dependencies and exports in your JavaScript and TypeScript projects. Less code and dependencies lead to improved performance, less maintenance and easier refactorings.

webpro-nl

JavaScript

29 Oct, 06:30


CHALLENGE

console.log(typeof null);
console.log(typeof function () {});

JavaScript

28 Oct, 13:34


๐ŸŸ  Svelte 5 is Alive

The long awaited next major release of Svelte, the compiler-driven JS UI framework, is the โ€œmost significant release in the projectโ€™s historyโ€, while remaining largely backwards compatible. A big addition is runes for explicitly declaring reactive state, but thereโ€™s much more besides. The official svelte.dev site has also undergone a big rebuild to act as an โ€˜omnisiteโ€™ for all things Svelte.

The Svelte Team

JavaScript

28 Oct, 06:30


CHALLENGE

const obj = {
value: 10,
getValue: function () {
return () => this.value;
}
};

const value = 20;
const getValue = obj.getValue();
console.log(getValue());

JavaScript

27 Oct, 13:36


โœŒ๏ธ JavaScript Weekly #710

JavaScript

27 Oct, 06:30


CHALLENGE

function Animal(name) {
this.name = name;
}
Animal.prototype.sound = 'Generic sound';

const dog = new Animal('Dog');

Animal.prototype.sound = 'Bark';
console.log(dog.sound);

JavaScript

26 Oct, 13:35


๐Ÿ˜‰ Build a Sonic Infinite Runner Game Using Kaplay

A two hour walkthrough of using the Kaplay game library (formerly known as Kaboom.js) to build a complete, if simple, Sonic-branded game. You can also play it here.

JSLegendDev

JavaScript

26 Oct, 06:30


CHALLENGE

async function test() {
console.log(1);
await new Promise(resolve => setTimeout(resolve, 1000));
console.log(2);
return 3;
}

console.log(4);
test().then(console.log);
console.log(5);

JavaScript

25 Oct, 13:29


๐Ÿ˜Ž The world's most loved .NET and game dev IDE

jetbrains

JavaScript

25 Oct, 06:30


CHALLENGE

console.log(typeof NaN);
console.log(NaN === NaN);

JavaScript

24 Oct, 15:45


๐ŸคŸ Node v23.0.0 (Current) Released

Say hello to the newest release line of Node.js that gets all the cutting edge features first (Node 22 will soon become the active LTS release). v23 notably enables support for loading ES modules with require() by default, drops 32-bit Windows support, and node --run goes stable.

Rafael Gonzaga

JavaScript

24 Oct, 06:30


CHALLENGE

function Person(name) {
this.name = name;
}

Person.prototype.greet = function () {
console.log(`Hello, ${this.name}`);
};

const person = new Person('Alice');
person.greet();

console.log(person.hasOwnProperty('greet'));

JavaScript

23 Oct, 13:51


๐Ÿฅถ Write Github Actions workflow files in TypeScript (compiles to YAML)

emmanuelnk

JavaScript

23 Oct, 06:30


CHALLENGE

for (var i = 0; i < 3; i++) {
setTimeout(() => console.log(i), 100);
}

JavaScript

22 Oct, 13:42


๐ŸคŸ To ensure your Node.js version is secure, use:


npx is-my-node-vulnerable


A tool created and maintained by the Node.js security team. This utility allows you to quickly check for known vulnerabilities and helps safeguard your projects.

JavaScript

22 Oct, 06:30


CHALLENGE โ“


const sym = Symbol('unique');
const obj = {
[sym]: 'Secret',
public: 'Visible'
};

console.log(Object.keys(obj));
console.log(obj[Symbol('unique')]);

JavaScript

21 Oct, 13:25


๐Ÿ˜† True ...

It's just easy to start.

JavaScript

21 Oct, 06:30


CHALLENGE โ“


Promise.resolve(1)
.then(value => {
console.log(value);
throw new Error('Something went wrong');
})
.then(() => {
console.log('This will not run');
})
.catch(error => {
console.log('Caught:', error.message);
return 42;
})
.then(value => {
console.log('Recovered with:', value);
});

JavaScript

19 Oct, 06:02


๐Ÿฅ‚ We Did It โ€“ 25K Subscribers!

We're excited to announce that our newsletter reached 25,000 subscribers! This was one of our biggest goals for 2024, and we couldnโ€™t have done it without your amazing support.

Thank you for being part of this journey. Weโ€™ve got more exciting content coming, so stay tuned!

JavaScript

18 Oct, 13:17


๐Ÿ‘€ The Story of Web Framework Hono, By Its Creator

Hono is a neat, lightweight framework designed to run on any JavaScript runtime that has been picking up steam in the past year. You can create a simple app reminiscent of Express.js, say, but run it on Cloudflare Workers, Deno, Bun, or Node. Itโ€™s in heavy use all over the place, and has lots of interesting features like letting you write HTML with JSX.

Yusuke Wada

JavaScript

18 Oct, 06:30


CHALLENGE โ“


const map = new Map();
const key1 = {};
const key2 = key1;

map.set(key1, "Value for key1");
map.set(key2, "Value for key2");

console.log(map.get({}));
console.log(map.get(key1));

JavaScript

17 Oct, 13:49


๐ŸคŸ Node v20.18.0 (LTS) Released; v20 'Iron' Prepares to Bow Out as Active LTS Release

Itโ€™s been a quiet few weeks for official releases. This update marks one of the last in Node 20โ€™s run as the active LTS release, and introduces experimental network inspection support. Node 22 will soon take over the active LTS crown (as per schedule) but what will its codename be given there are no elements starting with J? Amazingly, this question was asked six years ago and it's (probably) going to be Jod.

Michaรซl Zasso

JavaScript

17 Oct, 06:30


CHALLENGE โ“


const obj = {};
Object.defineProperty(obj, 'name', {
value: 'Alice',
writable: false,
configurable: false
});

try {
obj.name = 'Bob';
delete obj.name;
console.log(obj.name);
} catch (e) {
console.log('Error:', e.message);
}

JavaScript

16 Oct, 09:17


โœŒ๏ธ 10 New JS Features You Should Know About

Awesome

JavaScript

16 Oct, 06:30


CHALLENGE โ“


function processData({ a = 10, b = 20 } = { a: 30 }) {
console.log(a, b);
}

processData({ a: 5 });
processData();

JavaScript

15 Oct, 13:34


๐Ÿ’ป Does Deno 2 really uncomplicate JavaScript?

Beyond Fireship

JavaScript

15 Oct, 06:30


CHALLENGE โ“


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

const gen = numberGenerator();
console.log(gen.next().value);
console.log(gen.return(10).value);
console.log(gen.next().value);

JavaScript

14 Oct, 15:40


๐Ÿ”ฅ The WordPress ecosystem has lost its mindโ€ฆ

JavaScript

14 Oct, 06:31


CHALLENGE โ“


const obj = Object.freeze({
name: "Alice",
info: {
age: 25
}
});

try {
obj.name = "Bob";
obj.info.age = 30;
} catch (e) {
console.log("Error:", e.message);
}

console.log(obj.name, obj.info.age);

JavaScript

13 Oct, 13:22


๐Ÿ‘€ DOCX 9.0: Generate Word .docx Files from JavaScript

The code to lay out documents is verbose but thereโ€™s a lot of functionality baked in and there arenโ€™t many other options for this task. Hereโ€™s a CodePen-based example to give you an idea. GitHub repo.

Dolan Miu

JavaScript

13 Oct, 06:30


CHALLENGE โ“

async function first() {
console.log('First Start');
await second();
console.log('First End');
}

async function second() {
console.log('Second Start');
}

console.log('Script Start');
first();
setTimeout(() => console.log('Timeout'), 0);
console.log('Script End');

JavaScript

12 Oct, 13:20


โœŒ๏ธ TC39 Advances 10+ ECMAScript Proposals

The architects behind the development of the ECMAScript / JavaScript spec got together again this week (you can see them in this tweet) and they had a packed agenda. Import attributes, Iterator helpers, Promise.try and Regexp modifiers all made it to stage 4, and more besides.

Sarah Gooding (Socket)