JavaScript
32.1K subscribers
1.06K photos
10 videos
33 files
738 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
πŸ˜‚
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
πŸ˜‰Postgres is all you need for your AI application (EN)

Varik Matevosyan
Software Engineer (Lantern, YC W24)
Please open Telegram to view this post
VIEW IN TELEGRAM
11πŸ‘5❀4🀩1
❓ CHALLENGE

function Shape() {}
function Circle(radius) {}
Circle.prototype = Object.create(Shape.prototype);
const shape = new Shape();
console.log(shape instanceof Circle);
Please open Telegram to view this post
VIEW IN TELEGRAM
πŸ‘4❀3
πŸ€”15🀣66❀2πŸ‘2
Please open Telegram to view this post
VIEW IN TELEGRAM
9❀3🀣3πŸ‘1
❓ CHALLENGE

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

promise
.then(result => console.log(result))
.then(result => console.log(result))
.catch(error => console.error(error.message))
.finally(() => console.log('Finally'));
Please open Telegram to view this post
VIEW IN TELEGRAM
πŸ‘2
πŸ€”36πŸ‘10
😱 Development Notes from xkcd's 'Machine'

I bet many of you are fans of xkcd! For this year’s April Fools’ joke, they published β€˜Machine’, a giant Rube Goldberg machine of sorts (explained here). With a lot of TypeScript up front and Haskell in the back, here’s how it works at a technical level. (GitHub repo.)

MAX GOODHART
Please open Telegram to view this post
VIEW IN TELEGRAM
❀4πŸ‘1πŸ€”1🀣1
❓ CHALLENGE

const promise = new Promise((resolve, reject) => {
setTimeout(() => resolve(3), 1000);
});

promise
.then(result => {
console.log(result);
return result * 2;
})
.then(result => {
console.log(result);
return new Promise(resolve => setTimeout(() => resolve(result * 3), 1000));
})
.then(result => {
console.log(result);
});
Please open Telegram to view this post
VIEW IN TELEGRAM
πŸ‘17🀣6🀩4❀2
What is the output?
Anonymous Quiz
13%
3,6
27%
3,6,9
48%
3,6,18
12%
18
πŸ‘13❀3πŸ€”1
πŸ˜‰ Seamless Drag and Drop Between Applications

A fantastic demonstration of using browser APIs to create more elegant drag and drop experiences that even work across different browser windows or IFRAMEs, with Atlassian’s Pragmatic Drag and Drop library doing the heavy lifting.

ALEX REARDON
Please open Telegram to view this post
VIEW IN TELEGRAM
πŸ‘11❀3🀩1
❓ CHALLENGE

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

promise
.then(result => console.log(result))
.catch(error => console.error(error.message))
.then(() => console.log('After catch'))
.then(() => console.log('After then'))
.catch(error => console.error(error.message));
Please open Telegram to view this post
VIEW IN TELEGRAM
πŸ‘4πŸ€”1