JavaScript
32K subscribers
1.04K photos
10 videos
33 files
719 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
CHALLENGE

const array = [1, 2, 3, 4, 5];
const result = array.some(n => n % 2 === 0) && array.every(n => n < 10);

console.log(result);
👍54
What is the output?
Anonymous Quiz
53%
true
19%
false
21%
[1, 2, 3, 4, 5]
8%
Error
🔥9👍53
Please open Telegram to view this post
VIEW IN TELEGRAM
👍146🔥4
CHALLENGE

const obj1 = { a: 1, b: { c: 2 } };
const obj2 = { ...obj1 };

obj1.b.c = 3;

console.log(obj2.b.c);
👍76
What is the output?
Anonymous Quiz
10%
Error
18%
undefined
50%
3
23%
2
🤔15👍6🤩21
😆
Please open Telegram to view this post
VIEW IN TELEGRAM
🤣1044🤩3🔥1
CHALLENGE

const arr = [1, 2, 3, 4, 5];
const sliced = arr.slice(1, 3);
const spliced = arr.splice(1, 3);

console.log(sliced, spliced, arr);
👍13
This media is not supported in your browser
VIEW IN TELEGRAM
⚡️ Dynamically loaded extensions in Postgres in the browser

At a recent AGI House hackathon in San Francisco, we set out to run our Postgres vector extension directly in the browser. This would allow our documentation examples and small demos to be fully executable within the browser using a Postgres instance compiled to Wasm and running on the client browser.

lantern
Please open Telegram to view this post
VIEW IN TELEGRAM
🔥84👍3🤩2🤔1
CHALLENGE

const obj = { a: 1, b: 2 };
const obj2 = { ...obj, b: 3 };

const samePrototype = Object.getPrototypeOf(obj) === Object.getPrototypeOf(obj2);

console.log(samePrototype);
What is the output?
Anonymous Quiz
17%
undefined
14%
Error
35%
false
34%
true
👍16🔥6🤔54
🤩 BWIP-JS: A Barcode Writer in Pure JavaScript

A library that can generate barcodes using over 100 different barcode types and standards, both single and two dimensional. There is, of course, a live demo where you, too, can discover far more types of barcodes exist than you ever imagined.

Mark Warren
Please open Telegram to view this post
VIEW IN TELEGRAM
5🔥5👍3
CHALLENGE

function Foo() {
this.bar = 1;
}

Foo.prototype.bar = 2;

const foo = new Foo();
console.log(foo.bar);
👍5🤔2
What is the output?
Anonymous Quiz
29%
1
50%
2
15%
undefined
6%
Error
🤔19👍85🔥2
🌲 Check the latest updates of Nairi's long article about EventLoop

— Unblocking EventLoop using unref() (added in Jul of 2024)

— A challenging interview question (added in Feb of 2024)

nairihar
Please open Telegram to view this post
VIEW IN TELEGRAM
👍9🔥75
🌲 What is new in Node.js V22.5

In this article, we will review the notable changes introduced in the new Node.js version:

- node:sqlite module
- add matchesGlob method
- add postessageToThread method

nairihar
Please open Telegram to view this post
VIEW IN TELEGRAM
👍9🔥43
CHALLENGE

const func = () => arguments.length;
console.log(func(1, 2, 3));
🔥2
What is the output?
Anonymous Quiz
24%
undefined
19%
TypeError
7%
0
49%
3
👍225🤔4🔥2🤩1
Please open Telegram to view this post
VIEW IN TELEGRAM
👍8🤔7
Please open Telegram to view this post
VIEW IN TELEGRAM
👍61🔥1
CHALLENGE

const array = Array.from({ length: 5 }, () => Math.random() > 0.5);

console.log(array);
👍8