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
πŸ’» JSR first impressions

JSR is a new package repository being introduced by the team at Deno that aims to solve many problems in the Javascript eco-system. I was invited to take part in very early access to it and want to share my impressions.

Kitson P. Kelly
Please open Telegram to view this post
VIEW IN TELEGRAM
11❀5πŸ‘4
❓ CHALLENGE

let i = 0;
for (; i < 5; i++) {
setTimeout(() => console.log(i), 0);
}
Please open Telegram to view this post
VIEW IN TELEGRAM
❀9πŸ‘7
πŸ€”57πŸ‘14🀩72
πŸ“£ The React Team Shares What It's Been Working On

Work on React Compiler has progressed with it now powering Instagram’s prod site ('React 19 Will Be Compiled' goes into depth on what the compiler means for most React devs). We also learn React 19 is on the way and will include breaking changes to support things like Web Components.

THE REACT.JS CORE TEAM
Please open Telegram to view this post
VIEW IN TELEGRAM
10πŸ‘3❀2
❓ CHALLENGE

const num = 8;
const obj = {
num: 10,
inner: {
num: 6,
getNum: function() {
return this.num;
}
}
};
console.log(obj.inner.getNum());
const getNum = obj.inner.getNum;
console.log(getNum());
Please open Telegram to view this post
VIEW IN TELEGRAM
9πŸ€”6πŸ‘1
19πŸ€”11❀7πŸ‘4
🀟 Node.js's 2023 Summarized

Rafael, of the Node.js TSC and Fastify core team, shares a useful update on the evolution of Node.js over the past year, how the team ensures Node is well tested and reliable, changes to Node’s vendor dependencies (of which it gained three in 2023), as well as enhancements to Node’s security and Web presence.

RAFAEL GONZAGA
Please open Telegram to view this post
VIEW IN TELEGRAM
πŸ‘6❀3πŸ€”22
❓ CHALLENGE

const person = {};
person.name.toUpperCase();
console.log(person.name);
Please open Telegram to view this post
VIEW IN TELEGRAM
πŸ‘66❀4
πŸ˜‚ Pac-Man in JavaScript in 1 Hour

I felt old when Ania said β€œif you’ve never played Pac-Man before..” πŸ˜… – nonetheless, she’s back with another of her fantastic, thorough walkthroughs.

ANIA KUBΓ“W
Please open Telegram to view this post
VIEW IN TELEGRAM
πŸ‘1711❀5🀩3
❓ CHALLENGE

function fetchData(url) {
return new Promise((resolve, reject) => {
setTimeout(() => {
if (url.startsWith('https://api.example.com')) {
resolve({ data: 'Some data' });
} else {
reject(new Error('Invalid URL'));
}
}, 1000);
});
}

fetchData('https://api.example.com/data')
.then(response => console.log(response.data))
.catch(error => console.error(error));
Please open Telegram to view this post
VIEW IN TELEGRAM
❀11πŸ‘11πŸ€”33
πŸ“– VSCode shortcuts for you
Please open Telegram to view this post
VIEW IN TELEGRAM
πŸ‘60❀1613πŸ€”7🀩3🀣3
❓ CHALLENGE

class Rectangle {
constructor(width, height) {
this.width = width;
this.height = height;
}

get area() {
return this.width * this.height;
}
}

const rectangle = new Rectangle(5, 10);
console.log(rectangle.area());
Please open Telegram to view this post
VIEW IN TELEGRAM
πŸ‘14🀣2
🀟 Preventing SQL Injection Attacks in Node

Learn more about why and where SQL injection attacks pose a threat and some initial ways to shield your Node apps against them.

LUCIEN CHEMALY
Please open Telegram to view this post
VIEW IN TELEGRAM
πŸ‘13❀44
❓ CHALLENGE

const obj = { a: 1, b: 2 };
const key = 'c';
console.log(obj[key]);
Please open Telegram to view this post
VIEW IN TELEGRAM
πŸ‘16❀43
28πŸ‘6🀣4❀2πŸ€”1
πŸ’» JSR: What We Know So Far About Deno’s New JS Package Registry

The Deno team is cooking up JSR (still behind a waitlist), a new JavaScript package registry (not merely a package management tool, like pnpm or Yarn) to address various npm limitations, including for Node users who don't even plan to use Deno.

SARAH GOODING
Please open Telegram to view this post
VIEW IN TELEGRAM
7πŸ‘4❀3πŸ€”1
❓ CHALLENGE

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

promise.then(response => console.log(response)).catch(error => console.error(error));
Please open Telegram to view this post
VIEW IN TELEGRAM
πŸ‘11❀5