JavaScript
32.1K subscribers
1.06K photos
10 videos
33 files
737 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
πŸ‘€ I Reviewed 1,000s of Opinions on HTMX

htmx is an increasingly popular way to use modern, dynamic browser features through creative use of HTML attributes, rather than hand writing JS for everything. Dylan looks at the pros and cons through the lens of community sentiment.

DYLAN HUANG
Please open Telegram to view this post
VIEW IN TELEGRAM
πŸ‘7❀2🀩21
🍊 extension.js: Zero-Config, Cross Browser Extension Dev Starter

The goal is to make it as simple as a npx extension create my-extension to get started with building your own browser extensions. GitHub repo.

CEZAR AUGUSTO
Please open Telegram to view this post
VIEW IN TELEGRAM
πŸ‘8❀52
❓ CHALLENGE

console.log('Start');

Promise.resolve().then(() => console.log('Promise'));

const foo = n => {
console.log('Function call');
n > 0 && foo(n - 1);
};

setTimeout(() => foo(2), 0);
Please open Telegram to view this post
VIEW IN TELEGRAM
πŸ‘13πŸ€”4
🍿 Emoji Mart 5.6

Emoji selection component for the Web.
Please open Telegram to view this post
VIEW IN TELEGRAM
15❀2πŸ‘2🀩2
❓ CHALLENGE

console.log('Start');

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

Promise.resolve().then(() => console.log('Promise'));

console.log('End');
Please open Telegram to view this post
VIEW IN TELEGRAM
2❀1πŸ‘1
😯 Virtual x86: x86 Virtualization with JS and WASM

Run Linux, numerous older versions of Windows, BSD, MS-DOS, and other systems right in the browser (and quickly, too). Not a new project, but I’m always impressed how it’s constantly getting updates. GitHub repo.

FABIAN HEMMER
Please open Telegram to view this post
VIEW IN TELEGRAM
7πŸ‘6❀2🀩2
❓ CHALLENGE

function Car(make) {
this.make = make;
}

function Truck(make) {
this.make = make;
}

const car = new Car('Toyota');
const truck = new Truck('Toyota');

console.log(car.__proto__ === truck.__proto__);
console.log(car.constructor === truck.constructor);
console.log(car instanceof Truck);
console.log(car instanceof Car);
console.log(Truck.prototype.isPrototypeOf(car));
console.log(Car.prototype.isPrototypeOf(truck));
Please open Telegram to view this post
VIEW IN TELEGRAM
❀10πŸ‘4
πŸ˜‚
Please open Telegram to view this post
VIEW IN TELEGRAM
🀣97πŸ‘104❀1
❓ CHALLENGE

function Animal() {
this.type = 'animal';
}

function Dog() {
this.name = 'dog';
}

Dog.prototype = new Animal();

const rover = new Dog();
const spot = new Dog();

console.log(rover instanceof Dog);
console.log(rover instanceof Animal);
console.log(rover instanceof Object);

console.log(rover === spot);
console.log(rover.constructor === Dog);
console.log(rover.constructor === Animal);
Please open Telegram to view this post
VIEW IN TELEGRAM
❀8πŸ‘2
πŸ‘€ DerbyJS 4.0: The Mature MVC Web Framework

It’s never been the most popular of the frameworks, but Derby has lived through most of Node’s history and remains a viable option for building realtime, collaborative apps in particular. GitHub repo.

NATE SMITH ET AL.
Please open Telegram to view this post
VIEW IN TELEGRAM
πŸ‘64❀2🀣1
❓ CHALLENGE

function Animal() {}

function Dog() {}

Dog.prototype = Object.create(Animal.prototype);

const rover = new Dog();

console.log(rover.constructor === Animal);
Please open Telegram to view this post
VIEW IN TELEGRAM
❀6
❀10πŸ‘5🀩2πŸ€”1
🀟 Five Node Version Managers Compared

In an ideal world, the latest version of Node would slot well into every project, but in reality we often need to switch versions, and a variety of tools are available to make it simple. NVM is perhaps the best known, but maybe N, FNM, Volta, or even pnpm could suit you better?

PAVEL ROMANOV
Please open Telegram to view this post
VIEW IN TELEGRAM
❀7πŸ‘3🀩22
❓ CHALLENGE

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

Person.prototype.sayName = function() {
console.log('My name is ' + this.name);
};

const john = new Person('John');

console.log(john.sayName === Person.prototype.sayName);
Please open Telegram to view this post
VIEW IN TELEGRAM
❀7πŸ‘1
What is the output?
Anonymous Quiz
54%
true
26%
false
14%
undefined
6%
ReferenceError
❀15πŸ€”7πŸ‘44