What is the output?
Anonymous Quiz
19%
['a', 'b', 'c']
13%
['elppa', 'banana', 'cherry']
18%
['elppa', 'ananab', 'yrrehc']
50%
["aelpp", "aaabnn", "cehrry"]
π17π€7β€5π€©2
Please open Telegram to view this post
VIEW IN TELEGRAM
π€£99π12π₯3π€3 1
const data = [
{ id: 1, name: 'Alice', age: 25, gender: 'Female' },
{ id: 2, name: 'Bob', age: 30, gender: 'Male' },
{ id: 3, name: 'Charlie', age: 22, gender: 'Male' },
{ id: 4, name: 'David', age: 35, gender: 'Male' },
];
const result = data
.filter(person => person.gender === 'Male')
.map(person => ({ ...person, isSenior: person.age > 30 }))
.sort((a, b) => a.age - b.age)
.slice(0, 2)
.reduce((acc, person) => {
acc[person.name] = person.isSenior;
return acc;
}, {});
console.log(result);
Please open Telegram to view this post
VIEW IN TELEGRAM
β€5π3π€3
What is the output?
Anonymous Quiz
22%
{ Charlie: false, David: true }
27%
{ Bob: false, Charlie: false }
33%
{ David: true, Bob: false }
17%
{ Bob: false, David: true }
π€20π₯7π5β€2 1
πͺ The Await Event Horizon in JavaScript
You know someoneβs getting heavy when they start a JavaScript article by talking about the event horizon around black holes and how βa similar boundary exists around every JavaScript Promise.β Enjoy.
CHARLES LOWELL
You know someoneβs getting heavy when they start a JavaScript article by talking about the event horizon around black holes and how βa similar boundary exists around every JavaScript Promise.β Enjoy.
CHARLES LOWELL
π₯7β€5π5
const data = [1, 2, 3, 4, 5];
const result = data.map(num => Array.from({ length: num }, (_, index) => index + 1));
console.log(result);
Please open Telegram to view this post
VIEW IN TELEGRAM
π3β€1
What is the output
Anonymous Quiz
23%
[[1], [2, 1], [1, 2, 3], [1, 2, 3, 4], [1, 2, 3, 4, 5]]
21%
[[1], [2], [3], [4], [5]]
12%
[[1], [2], [3], [4], [5], [6]]
43%
[[1], [1, 2], [1, 2, 3], [1, 2, 3, 4], [1, 2, 3, 4, 5]]
β€7π₯7π5π€4
This is gorgeous! You can have a lot of fun adjusting the parameters to change the outcome, or you can spin up and play with your own copy using the source code. If you donβt want to stress out your browser, you can see how it looks βΆοΈ in this video.
DANIEL GREENHECK
Please open Telegram to view this post
VIEW IN TELEGRAM
π₯5β€4π4
const data = [1, 2, 3, 4, 5];
const result = data.flatMap(num => Array.from({ length: num * 2 - 1 }, (_, index) => index % 2 === 0 ? num : index + 1));
console.log(result);
Please open Telegram to view this post
VIEW IN TELEGRAM
β€5π2
What is the output?
Anonymous Quiz
48%
[1, 2, 2, 2, 3, 2, 3, 4, 3, 4, 2, 4, 4, 4, 6, 4, 5, 2, 5, 4, 5, 6, 5, 8, 5]
19%
[1, 1, 2, 3, 3, 4, 5, 5, 6, 7, 8, 9]
20%
[1, 1, 2, 3, 3, 4, 5, 5, 6, 7, 7, 8, 9]
13%
[1, 2, 3, 4, 5, 6, 7, 8, 9]
π8π€4β€2π₯2π€©1
βJust because you know something needs JavaScript, doesnβt mean it still does. You can make better websites if you test those assumptions every now and then.β
KILLIAN VALKHOF
Please open Telegram to view this post
VIEW IN TELEGRAM
β€9π4π₯2π€£2
P.S. Dear premium Telegram users, this Christmas, the gift is in your hands! Boost us on Telegram for free, and your support becomes the festive present to all of us (it enables features like stories and more).
Please open Telegram to view this post
VIEW IN TELEGRAM
β€30π5π₯4π€©3 3π€£2
if (false) {
function foo() {
return 1;
}
}
console.log(foo());
Please open Telegram to view this post
VIEW IN TELEGRAM
π12β€1
Erick Wendel
Please open Telegram to view this post
VIEW IN TELEGRAM
π13 4β€3
const numbers = [2, 4, 6, 8, 10];
const result = numbers.reduce((acc, val) => {
acc[val] = val * 2;
return acc;
}, {});
console.log(result);
Please open Telegram to view this post
VIEW IN TELEGRAM
β€6π1
What is the output?
Anonymous Quiz
19%
{ 2: 4, 4: 8, 6: 12, 8: 16, 10: 10 }
51%
{ 2: 4, 4: 8, 6: 12, 8: 16, 10: 20 }
10%
{ 2: 4, 4: 8, 6: 12, 8: 16 }
20%
{ 4: 8, 8: 16, 12: 24, 16: 32, 20: 40 }
Please open Telegram to view this post
VIEW IN TELEGRAM
What are your favorite frontend frameworks?
Anonymous Poll
76%
React
17%
Angular
14%
Vue.js
5%
Svelte
3%
Astro
20%
Next.js
3%
Remix
6%
htmx