π€22π12β€7 4
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
π9 4β€2
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
What is the output?
Anonymous Quiz
28%
2
44%
1
15%
undefined
13%
TypeError: Cannot set property 'a' of undefined
π€£20π€13π11β€7 7
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
π€70π€£25π16β€5 1
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
π12 5β€4π€1
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
What is the output?
Anonymous Quiz
25%
[1, 2, 3, 2, 4, 6]
41%
[1, 2, 2, 4, 3, 6]
28%
[2, 4, 6]
6%
[1, 2, 3]
π€©15β€8π4
Wow check this out fully typed Vue components π²
Features
- Dark mode support
- Keyboard shortcuts
- Icons
...
ManukMinasyan
Features
- Dark mode support
- Keyboard shortcuts
- Icons
...
ManukMinasyan
Please open Telegram to view this post
VIEW IN TELEGRAM
β€5π2 2
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
π15 12β€5
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
What is the output?
Anonymous Quiz
33%
1
17%
undefined
27%
TypeError: Cannot assign to read only property 'a' of object
24%
2
π€28π14β€5
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
π13 3β€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π€12 8β€6π6
π€30π10π€£6β€4
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
π11 5β€3