JavaScript
32K subscribers
1.04K photos
10 videos
33 files
717 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👍6🔥2
🤟 Node.js Weekly #560 - last report

A look back at Node's 2024

2024 has been a solid year for Node, with the release of Node.js v22 back in April (now in LTS) and v23 in October. Node also got a new mascot this year (above), Express 5.0 arrived, Node has dabbled with type stripping to better support TypeScript, and a native SQLite module has been under active development. Fingers crossed for an interesting 2025!
Please open Telegram to view this post
VIEW IN TELEGRAM
13🔥5👍4
🥂 Let's rock the 2025!
Please open Telegram to view this post
VIEW IN TELEGRAM
44🔥26🤣6🤩4🤔3👍1
CHALLENGE


function combine(...arrays) {
return arrays.reduce((acc, arr) => [...acc, ...arr], []);
}

const result = combine([1, 2], [3, 4], [5, 6]);
console.log(result);
👍8🤩3
🔥20👍103
CHALLENGE


const obj = {
valueOf() {
return 42;
}
};

const result = obj + 8;
console.log(result);
👍113🤣3
What is the output?
Anonymous Quiz
21%
object Object8
11%
42
53%
50
15%
undefined
🤩22👍107
CHALLENGE

function trickyFunction() {
var a = 10;
var b = a;
b = 15;

const obj1 = { x: 1 };
const obj2 = obj1;
obj2.x = 5;

console.log(a + ' ' + b + ' ' + obj1.x);
}

trickyFunction();
🤣10🤔9👍7
What is the output?
Anonymous Quiz
30%
10 15 1
22%
15 15 5
41%
10 15 5
7%
10 10 1
👍34🤣19🤔11🔥2🤩1
🌦 awesome-nest-schematics

Awesome Nest Boilerplate architecture element generation based on Angular schematics 🎬

NarHakobyan
Please open Telegram to view this post
VIEW IN TELEGRAM
👍9🔥53
CHALLENGE

function trickyFunction() {
var x = 10;
if (x > 5) {
let y = x * 2;
x = y;
}
return x;
}

console.log(trickyFunction());
👍115
What is the output?
Anonymous Quiz
67%
20
10%
undefined
20%
10
3%
ReferenceError
👍31🤣202🤔1
🌦 awesome-nest-boilerplate

This is an ever-evolving, very opinionated architecture and dev environment for new node projects using NestJS.

NarHakobyan
Please open Telegram to view this post
VIEW IN TELEGRAM
👍93🔥1
CHALLENGE

function trickyFunction() {
var obj = { a: 1 };
var anotherObj = obj;
obj.a = 2;
obj = { a: 3 };
anotherObj.a = 4;
return obj.a + anotherObj.a;
}

console.log(trickyFunction());
12🤔6👍2
What is the output?
Anonymous Quiz
21%
6
43%
7
31%
8
6%
5
🔥27👍95🤔2
Please open Telegram to view this post
VIEW IN TELEGRAM
👍8🔥31
CHALLENGE

async function fetchData() {
let data = 'initial';

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

promise.then((result) => {
data = result;
});

return data;
}

fetchData().then(console.log);
👍132
🤔16👍14🤣112🔥2
😢
Please open Telegram to view this post
VIEW IN TELEGRAM
🤣75🤔13🤩2
CHALLENGE

const WM = new WeakMap();
let obj = {};
let anotherObj = {};
WM.set(obj, 'object data');
WM.set(anotherObj, 'another object data');
obj = null;

// Let's check what's logged
console.log(WM.has(obj));
console.log(WM.has(anotherObj));
👍91
7👍6🔥4