JavaScript
31.9K subscribers
1.02K photos
9 videos
33 files
700 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 map = new Map();
map.set("key", undefined);
console.log(map.has("key"), map.get("key"));
Please open Telegram to view this post
VIEW IN TELEGRAM
πŸ‘7
❀12πŸ‘7πŸ”₯1🀣1
πŸ‘ Linkify 4.2: Link Up URLs, Emails, and More in Plain Text

Given plain text containing things like links, hashtags, IP addresses, and email addresses, this will generate the correct code to display it on the Web.

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


class MyClass {
constructor() {
this.a = 10;
}
}
MyClass.prototype.b = 20;
const obj = new MyClass();
delete obj.b;
console.log(obj.b);
Please open Telegram to view this post
VIEW IN TELEGRAM
πŸ‘8❀5
What is the output?
Anonymous Quiz
43%
undefined
33%
20
12%
Error
12%
null
πŸ€”17πŸ‘7❀2
Please open Telegram to view this post
VIEW IN TELEGRAM
πŸ‘5❀3
CHALLENGE

const symbol1 = Symbol('desc1');
const symbol2 = Symbol('desc2');
const myObject = {};
myObject[symbol1] = 'Value1';
myObject[symbol2] = 'Value2';
let output = '';
for (let key in myObject) {
output += myObject[key] + ' ';
}
output += Object.getOwnPropertySymbols(myObject).length;
console.log(output);
πŸ‘8❀4
What is the output?
Anonymous Quiz
47%
Value1 Value2 2
29%
2
19%
Value1 Value2 0
6%
0
πŸ€”13πŸ‘11❀6
CHALLENGE

const numbers = [2, 4, 6, 8];
const sum = numbers.reduce((acc, num) => acc + num, 0);
console.log(sum);
πŸ‘6πŸ€”5
What is the output?
Anonymous Quiz
79%
20
14%
18
6%
24
2%
15
❀6πŸ‘6πŸ”₯2🀩1
Please open Telegram to view this post
VIEW IN TELEGRAM
πŸ”₯8πŸ‘2❀1
CHALLENGE

var obj = {
a: 10,
b: 20,
c: 'hello'
};

with (obj) {
var sum = a + b;
var greeting = c + ' world';
}

console.log(sum, greeting);
πŸ‘15πŸ”₯2🀩2
πŸ€”14πŸ‘7❀5🀣2
🀟 Node.js Delivers First LTS with require(esm) Enabled

It’s a modest milestone, but Node v22.12.0 (LTS) has been released and marks Node’s first LTS release with non-flagged support for loading native ES modules with require(). It’s still experimental, though, and you’re encouraged to send in feedback and bug reports.

Sarah Gooding
Please open Telegram to view this post
VIEW IN TELEGRAM
πŸ‘8πŸ”₯2❀1
CHALLENGE

let a = 5; // binary: 0101
let b = 3; // binary: 0011

let result = a & b;

console.log(result);
πŸ‘8❀4🀩2πŸ”₯1
What is the output?
Anonymous Quiz
44%
1
20%
3
21%
5
15%
7
πŸ€”18❀5πŸ‘4
πŸ–ΌοΈ wasm-vips: It's libvips, Compiled to WebAssembly

libvips is a popular, highly efficient image processing library written in C. You can use it via Sharp in Node.js, but this offers a more isomorphic route for use in Node, Deno, and modern browsers by way of WebAssembly. (There's a nifty online demo here.)

Kleis Auke Wolthuizen
Please open Telegram to view this post
VIEW IN TELEGRAM
πŸ‘5❀3πŸ”₯3
CHALLENGE

const defaultSettings = {
theme: 'light',
notifications: true,
location: 'USA'
};

const userSettings = {
theme: 'dark',
location: 'Canada'
};

const finalSettings = {
...defaultSettings,
...userSettings
};

console.log(finalSettings);
πŸ‘17❀3
✌️ Boa v0.20: An Alternative JavaScript Compiler

Under development for several years, Boa has a few missions: be a Rust ECMAScript implementation, be easy to embed in Rust projects, and be a fast, safe JS engine overall. v0.20 sees a bump up to 89.92% compliance in the Test262 suite, improves Temporal support, adds Atomics.pause, and more. This is no toy engine.

Boa Developers
Please open Telegram to view this post
VIEW IN TELEGRAM
πŸ‘4πŸ”₯2❀1