const data = [1, 2, 3, 4, 5];
const result = data.reduce((acc, val) => acc.concat(Array.from({ length: val }, (_, index) => val + index)), []);
console.log(result);
Please open Telegram to view this post
VIEW IN TELEGRAM
π6 2β€1π€1
What is the output?
Anonymous Quiz
32%
[1, 2, 2, 3, 3, 4, 5, 5, 5, 6, 7, 7, 8, 9, 9]
27%
[1, 2, 3, 4, 5, 6, 7, 8, 9]
31%
[1, 2, 3, 3, 4, 5, 4, 5, 6, 7, 5, 6, 7, 8, 9]
11%
[1, 2, 2, 3, 3, 4, 5, 5, 6, 7, 8, 9]
π15π€8β€4
π₯ Why I donβt burnout and still love programming
Youβre facing a 10-day deadline, and you end up procrastinating for the first 8 days because you just didnβt have the mood to work. However, you managed to complete the task ...
"My Story of Beating Burnout and Loving Programming"
Nairi
Youβre facing a 10-day deadline, and you end up procrastinating for the first 8 days because you just didnβt have the mood to work. However, you managed to complete the task ...
"My Story of Beating Burnout and Loving Programming"
Nairi
β€11π7 3
const data = [1, 2, 3, 4, 5];
const result = data.flatMap(num => Array(num).fill(num * 2));
console.log(result);
Please open Telegram to view this post
VIEW IN TELEGRAM
π4
What is the output?
Anonymous Quiz
20%
[1, 1, 2, 2, 3, 3, 4, 4, 5, 5]
10%
[1, 2, 3, 4, 5]
20%
[1, 2, 2, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 5]
50%
[2, 4, 4, 6, 6, 6, 8, 8, 8, 8, 10, 10, 10, 10, 10]
Check out our awesome emoji pack βοΈ
βοΈ
π π΅
π€ π² π π»
π² π π π π΅
π π π π₯ π΄ π¦
π π π π π π π
β¦
β‘οΈ Boost us in Telegram.
β¦
Please open Telegram to view this post
VIEW IN TELEGRAM
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.age).reduce((acc, age) => acc + age, 0);
console.log(result);
Please open Telegram to view this post
VIEW IN TELEGRAM
π8β€4 2
π22 17β€4π€£4
This repository is a compilation of well-written, step-by-step guides for re-creating our favorite technologies from scratch.
codecrafters-io
Please open Telegram to view this post
VIEW IN TELEGRAM
π12β€4 3
const numbers = [1, 2, 3, 4, 5];
const result = numbers.reduce((acc, num) => {
if (num % 2 === 0) {
acc.even += num;
} else {
acc.odd *= num;
}
return acc;
}, { even: 0, odd: 1 });
console.log(result);
Please open Telegram to view this post
VIEW IN TELEGRAM
π11β€1
What is the output?
Anonymous Quiz
64%
{ even: 6, odd: 15 }
17%
{ even: 9, odd: 120 }
13%
{ even: 6, odd: 120 }
6%
{ even: 9, odd: 15 }
Vue 2 went βend of lifeβ last week, but never fear, we got a new version of Vue 3 to make up for it, complete with a rewritten, faster template parser, and a more efficient reactivity system. If you prefer a screencast tour, βΆοΈ Erik Hanchett has one for you.
EVAN YOU
Please open Telegram to view this post
VIEW IN TELEGRAM
In the modern IT industry, Java and JavaScript stand as leading programming languages for building scalable and reliable software systems. They offer flexibility and automation capabilities for implementing business rules.
Gnel Simonyan
Please open Telegram to view this post
VIEW IN TELEGRAM
CHALLENGE
const words = ['apple', 'banana', 'cherry'];
const result = words.map(word => [...word].reduce((acc, char) => char + acc, ''));
console.log(result);
π15 3β€2
What is the otuput?
Anonymous Quiz
62%
["elppa", "ananab", "yrrehc"]
14%
['epple', 'ananab', 'rehtc']
13%
['elppa', 'ananab', 'rehtc']
12%
['epple', 'ananab', 'yrrehc']
π22 4β€3
Famously roasted in JavaScript: The Good Parts before its deprecation, with isnβt a popular language feature at all, so Alex's appeal here is partly tongue in cheek. Nonetheless, with has some potentially interesting uses in modern JavaScript.
ALEX MACARTHUR
Please open Telegram to view this post
VIEW IN TELEGRAM
function Car(make, model) {
this.make = make;
this.model = model;
}
Car.prototype.displayInfo = function () {
return `Make: ${this.make}, Model: ${this.model}`;
};
const myCar = new Car('Toyota', 'Camry');
console.log(myCar.displayInfo());
Please open Telegram to view this post
VIEW IN TELEGRAM
π4β€1
What is the output?
Anonymous Quiz
15%
[object Object]
74%
Make: Toyota, Model: Camry
7%
Undefined
5%
This will result in an error.
β€17π6 4
Our JavaScript community has grown to 8K strong, and we're thrilled to have each and every one of you on this coding journey with us! π
β‘οΈ Boost us in Telegram
Please open Telegram to view this post
VIEW IN TELEGRAM
π€©25 12π8β€7
Media is too big
VIEW IN TELEGRAM
In addition to maintaining this newsletter, we also organize conferences.
Previous year, 13 super-smart devs shared cool stuff with 800 friends. Halls were buzzing, and we loved watching it!
Guess what? Another fun year is coming! We'll learn, help each other, and make our community bigger.
More talks, a bigger place, and more friends β it's gonna be awesome!
P.S. If you want to become our next Speaker or Sponsor contact me.
P.S. You can follow our conference channel on telegram.
#javascriptarmenia #conference
Please open Telegram to view this post
VIEW IN TELEGRAM
β€7π4 3