JavaScript
32K subscribers
1.02K photos
9 videos
33 files
705 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
πŸ‘7πŸ”₯2❀1
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'));
πŸ‘7
πŸ‘18πŸ€”8πŸ”₯2
🀟 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
Please open Telegram to view this post
VIEW IN TELEGRAM
❀10πŸ‘4πŸ”₯3
CHALLENGE

console.log(typeof NaN);
console.log(NaN === NaN);
🀣21πŸ€”5❀2
🀣30πŸ‘7❀3πŸ”₯1
Please open Telegram to view this post
VIEW IN TELEGRAM
πŸ‘12πŸ”₯5❀1
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);
πŸ‘3πŸ”₯1
πŸ‘13πŸ”₯5🀣4❀3
πŸ˜‰ 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
Please open Telegram to view this post
VIEW IN TELEGRAM
1πŸ‘10❀3πŸ”₯3
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);
πŸ‘3
What is the output?
Anonymous Quiz
17%
Undefined
10%
Error
53%
Bark
20%
Generic sound
🀣14πŸ‘10❀4🀩2
Please open Telegram to view this post
VIEW IN TELEGRAM
πŸ”₯12πŸ‘4❀1
CHALLENGE

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

const value = 20;
const getValue = obj.getValue();
console.log(getValue());
πŸ‘3πŸ”₯3
What is the output?
Anonymous Quiz
45%
10
31%
20
18%
undefined
6%
Error
πŸ”₯15πŸ‘5❀2
🟠 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
Please open Telegram to view this post
VIEW IN TELEGRAM
πŸ‘8❀3πŸ”₯2
CHALLENGE

console.log(typeof null);
console.log(typeof function () {});
1πŸ”₯10πŸ‘4🀣4❀3
πŸ‘€ 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
Please open Telegram to view this post
VIEW IN TELEGRAM
πŸ‘5❀3πŸ”₯2πŸ€”1
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');
❀1πŸ‘1
πŸ‘15❀4πŸ”₯2πŸ€”2