JavaScript
32.1K subscribers
1.05K photos
10 videos
33 files
725 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
πŸ˜† True...
Please open Telegram to view this post
VIEW IN TELEGRAM
🀣73πŸ‘4πŸ€”3❀1
CHALLENGE

let obj = { a: 1 };
let proto = { b: 2 };

Object.setPrototypeOf(obj, proto);

for (let key in obj) {
console.log(key);
}
πŸ‘3πŸ€”2
What is the output?
Anonymous Quiz
12%
none
55%
a, b
10%
b
23%
a
πŸ”₯13πŸ‘9πŸ€”5❀4
🀟 Node v22.2.0 (Current) Released

A less significant release, feature-wise, than 22.0 or 22.1, but lots of little bug fixes, tweaks around core dev experience, getting Node’s built-in ESLint rules ready for ESLint v9, and the ՝--inspect-wait՝ flag to make the debugger wait for a connection in order to debug code from the very start of execution.

MICHAΓ‹L ZASSO
Please open Telegram to view this post
VIEW IN TELEGRAM
πŸ‘6❀4πŸ”₯2🀩2
CHALLENGE

let obj = { a: 1 };
Object.freeze(obj);

console.log(Object.isFrozen(obj));
console.log(obj.a = 2);
console.log(obj.a);
❀5πŸ”₯5πŸ‘1πŸ€”1
πŸ€”19πŸ‘6❀3πŸ”₯2
🀟 SOME UPDATES
Please open Telegram to view this post
VIEW IN TELEGRAM
πŸ‘14❀1πŸ”₯1🀩1
CHALLENGE

let obj = {};
Object.defineProperty(obj, 'a', {
value: 1,
enumerable: true
});

let clone = Object.create(
Object.getPrototypeOf(obj),
Object.getOwnPropertyDescriptors(obj)
);

console.log(clone.a);
console.log(clone.hasOwnProperty('a'));
πŸ‘12❀3πŸ”₯3
πŸ‘11❀3πŸ”₯2
QUICK BITS:

🀝 It hasn't been finalized yet, but the Node team is working on a Node.js Advocacy Ambassador program where the team will nominate a group of annual ambassadors to help in spreading the word about various Node.js topics.

⚠️ If you haven't taken the official Node.js Next 10 Survey yet, please do! Entries close this Friday, May 24, and your input will help steer future core team decisions.

‼️ Talking of surveys, the 2024 Stack Overflow developer survey has just gone live. It's open till June 7.
Please open Telegram to view this post
VIEW IN TELEGRAM
πŸ‘5❀2πŸ”₯2
CHALLENGE

let proto = { a: 1 };
let obj = Object.create(proto);

Object.defineProperty(obj, 'a', {
value: 2,
writable: false,
enumerable: true,
configurable: false
});

console.log(obj.a);
proto.a = 3;
console.log(obj.a);
πŸ”₯7
What is the output?
Anonymous Quiz
19%
1, 2
43%
2, 3
12%
3, 3
25%
2, 2
πŸ‘15πŸ€”9❀5🀩4πŸ”₯3
✌️⚑️ IN BRIEF & SOME RELEASES
Please open Telegram to view this post
VIEW IN TELEGRAM
πŸ”₯6πŸ‘2❀1
CHALLENGE

console.log(1);

setTimeout(() => {
console.log(2);
}, 100);

setTimeout(() => {
console.log(3);
}, 0);

Promise.resolve().then(() => {
console.log(4);
}).then(() => {
console.log(5);
});

console.log(6);
πŸ‘8❀3
❀11πŸ€”5🀩4πŸ‘3πŸ”₯3
🧠 Brainchop 4.0

An in-browser 3D MRI rendering system. (Demo.)
Please open Telegram to view this post
VIEW IN TELEGRAM
🀣10πŸ”₯5❀4πŸ‘4
CHALLENGE

const obj = {
a: 1,
b: function() {
return () => {
return this.a;
};
},
c: function() {
return function() {
return this.a;
};
}
};

const arrowFunc = obj.b();
const regularFunc = obj.c();

console.log(arrowFunc());
console.log(regularFunc());
πŸ‘9πŸ€”6
❀17πŸ€”13πŸ‘5🀣3πŸ”₯1
πŸ€” City in a Bottle: Raycasting in 256 Bytes

Frank has a great reputation for putting together stunning visual demos with the tiniest amounts of JavaScript. This is no exception. He goes into a lot of detail about how it works; you’ll learn a few things and/or come away awe-struck.

FRANK FORCE
Please open Telegram to view this post
VIEW IN TELEGRAM
πŸ‘3❀2πŸ”₯2🀩2
CHALLENGE

function* generator() {
yield* [1, 2, 3];
yield 4;
}

const gen = generator();
console.log([...gen]);
❀1πŸ‘1🀣1
What is the output?
Anonymous Quiz
17%
[4]
12%
[1, 4]
17%
[1, 2, 3]
54%
[1, 2, 3, 4]
🀩9🀣8πŸ”₯5πŸ‘3❀1πŸ€”1