JavaScript
32.1K subscribers
1.06K photos
10 videos
33 files
737 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
What is the output?
Anonymous Quiz
14%
1, null
24%
1, undefined
52%
1,2
9%
1, 1
πŸ€”22πŸ‘12❀74
🀟 __dirname is Back in Node with ES Modules

In an ES module, instead of using __dirname or __filename, you can now use import.iss.oneta.dirname and import.iss.oneta.filename (this came with Node 20.11.0 (LTS) released in January).

PHIL NASH
Please open Telegram to view this post
VIEW IN TELEGRAM
πŸ‘94❀2
❓ CHALLENGE

const a = { a: 1 };
const b = Object.assign({}, a);
b.a = 2;
console.log(a.a);
Please open Telegram to view this post
VIEW IN TELEGRAM
🀣20πŸ€”13πŸ‘11❀77
✌️ Optimizing Javascript for fun and for profit

Interesting benchmarks 🍊

romgrk
Please open Telegram to view this post
VIEW IN TELEGRAM
❀7πŸ‘3πŸ€”11
❓ CHALLENGE

const a = [1, 2, 3];
const b = a.slice(0, 2).push(4);
console.log(b);
Please open Telegram to view this post
VIEW IN TELEGRAM
πŸ‘2
What is the output?
Anonymous Quiz
56%
[1, 2, 4]
11%
[1, 2]
8%
3
25%
4
πŸ€”70🀣25πŸ‘16❀51
✌️ JavaScript Visualized: Promise Execution

A helpful diagrammed and animated article, coupled with an (optional) 8-minute video, that goes into how promises work and are scheduled behind the scenes. It’s useful to have a good mental model of these mechanics, given promises form the basis of asynchronous functions in JavaScript.

LYDIA HALLIE
Please open Telegram to view this post
VIEW IN TELEGRAM
πŸ‘125❀4πŸ€”1
❓ CHALLENGE

const a = [1, 2, 3];
const b = a.flatMap(x => [x, x * 2]);
console.log(b);
Please open Telegram to view this post
VIEW IN TELEGRAM
πŸ‘9❀1
🀩15❀8πŸ‘4
Wow check this out fully typed Vue components 🌲

Features

- Dark mode support
- Keyboard shortcuts
- Icons
...


ManukMinasyan
Please open Telegram to view this post
VIEW IN TELEGRAM
❀5πŸ‘22
❓ CHALLENGE

const a = [1, 2, 3];
const b = a.findIndex(x => x === 4);
console.log(b);
Please open Telegram to view this post
VIEW IN TELEGRAM
❀6πŸ€”4
What is the output?
Anonymous Quiz
19%
0
10%
1
18%
3
53%
-1
πŸ‘1512❀5
Please open Telegram to view this post
VIEW IN TELEGRAM
❀9πŸ‘65
❓ CHALLENGE

const a = { a: 1 };
const b = Object.seal(a);
b.a = 2;
console.log(a.a);
Please open Telegram to view this post
VIEW IN TELEGRAM
πŸ‘8❀2
πŸ€”28πŸ‘14❀5
βœŒοΈπŸŒ• Some Cross-Browser DevTools Features You Might Not Know

Explore the awesome and incredibly useful DevTools features that are supported in Chromium, Firefox, and Safari alike.

Pankaj Parashar
Please open Telegram to view this post
VIEW IN TELEGRAM
πŸ‘133❀2
CHALLENGE ❓


let sum = 0;
for (let i = 0; i < 3; i++, sum++) { sum *= i }

console.log(sum);
Please open Telegram to view this post
VIEW IN TELEGRAM
🀣29πŸ€”128❀6πŸ‘6
What is the output?
Anonymous Quiz
29%
4
18%
5
35%
0
18%
Error
πŸ€”30πŸ‘10🀣6❀4
✌️ A Proposal to Add Signals to JavaScript

A (very) early stage proposal for bringing a new feature to ECMAScript/JavaScript: signals! The proposal brings aboard ideas from a swathe of popular frameworks and aims to align everyone and get us on the same page when it comes to working with state and making updates based upon changes to state. Rob writes more about the proposal here.

ROB EISENBERG AND DANIEL EHRENBERG
Please open Telegram to view this post
VIEW IN TELEGRAM
πŸ‘115❀3