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
😱 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
πŸ‘10❀4🀣22🀩1
πŸ‘€ Pintora: An Extensible Text-to-Diagram Rendering Library

A similar idea to Mermaid but with a different attitude to extensibility as well as no requirement for a headless browser server-side. The intro docs have both visual and code examples.

HIKERPIG
Please open Telegram to view this post
VIEW IN TELEGRAM
5❀2πŸ‘2
🀣51πŸ€”15🀩77❀5πŸ‘5
CHALLENGE

function Product(name, price) {
this.name = name;
this.price = price;
}

Product.prototype.discount = function(discount) {
this.price -= discount;
};

const product = new Product('Phone', 500);
product.discount(50);

console.log(product.price);
πŸ‘8❀2πŸ”₯1
What is the output?
Anonymous Quiz
14%
500
67%
450
11%
550
8%
NaN
πŸ‘12🀣104πŸ€”1🀩1
πŸ‘Έ Dear Subscribers,

We hope you're enjoying the content on our channel! ❀️

To continue delivering more exciting content, features, and exclusive stories, we're kindly asking telegram premium users to help us take things to the next level.

By boosting our channel, you'll directly contribute to enhancing your viewing experience and supporting the growth of our community.

Thank you for being a part of our journey. πŸš€

P.S. Each Premium user can boost 4 times.

https://t.iss.one/javascript?boost
Please open Telegram to view this post
VIEW IN TELEGRAM
πŸ‘146❀2
CHALLENGE

function Animal() {}

function Dog() {}

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

const rover = new Dog();

console.log(rover.constructor === Animal);
console.log(rover.constructor === Dog);
console.log(Dog.prototype.isPrototypeOf(rover));
console.log(Animal.prototype.isPrototypeOf(rover));
πŸ‘3❀2πŸ”₯2πŸ€”1
πŸ˜† ...
Please open Telegram to view this post
VIEW IN TELEGRAM
🀣100πŸ‘117❀4πŸ€”2
CHALLENGE

function Shape() {}

function Circle(radius) {
this.radius = radius;
}

Circle.prototype = Object.create(Shape.prototype);
Circle.prototype.constructor = Circle;

const shape = new Shape();
const circle = new Circle(5);

console.log(circle instanceof Circle);
console.log(circle instanceof Shape);
console.log(shape instanceof Circle);
console.log(shape instanceof Shape);
❀9πŸ‘3πŸ”₯1
πŸ‘8❀4🀩4🀣3πŸ”₯1
🏀 Building the most performant web applications with Angular

ArmenVardanyan
Author of
"Modern Angular"
Google DevExpert for Angular
Please open Telegram to view this post
VIEW IN TELEGRAM
❀3πŸ‘3πŸ”₯2🀣2πŸ€”1🀩1
CHALLENGE

function Animal() {}
function Dog() {}
Dog.prototype = Object.create(Animal.prototype);
const rover = new Dog();
console.log(rover.hasOwnProperty('constructor'));
πŸ‘5❀2πŸ”₯2🀣2
πŸ€”7🀣4❀3πŸ‘3πŸ”₯1
🀟 Execa 9.0: The Better child_process Gets Even Better

Less shell-oriented than zx, execa focuses on making executing external commands secure, cross-platform, and easy to debug. v9 lets you make commands iterable so you can process their output on the fly, map/filter both input and output, pipe multiple commands, and more. GitHub repo.

EHMICKEY, SORHUS, ET AL.
Please open Telegram to view this post
VIEW IN TELEGRAM
πŸ‘5❀2πŸ”₯2🀣2🀩1