JAVASCRIPT Telegram 2729
CHALLENGE

const numbers = [1, 2, 3, 4, 5];

const pipeline = (...fns) => (value) => fns.reduce((acc, fn) => fn(acc), value);

const multiply = (x) => (y) => x * y;
const add = (x) => (y) => x + y;
const square = (x) => x * x;

const transform = pipeline(
multiply(2),
add(3),
square
);

const result = numbers.map(transform);
console.log(result);
👍63



tgoop.com/javascript/2729
Create:
Last Update:

CHALLENGE

const numbers = [1, 2, 3, 4, 5];

const pipeline = (...fns) => (value) => fns.reduce((acc, fn) => fn(acc), value);

const multiply = (x) => (y) => x * y;
const add = (x) => (y) => x + y;
const square = (x) => x * x;

const transform = pipeline(
multiply(2),
add(3),
square
);

const result = numbers.map(transform);
console.log(result);

BY JavaScript


Share with your friend now:
tgoop.com/javascript/2729

View MORE
Open in Telegram


Telegram News

Date: |

Telegram desktop app: In the upper left corner, click the Menu icon (the one with three lines). Select “New Channel” from the drop-down menu. 4How to customize a Telegram channel? How to Create a Private or Public Channel on Telegram? Find your optimal posting schedule and stick to it. The peak posting times include 8 am, 6 pm, and 8 pm on social media. Try to publish serious stuff in the morning and leave less demanding content later in the day. Today, we will address Telegram channels and how to use them for maximum benefit.
from us


Telegram JavaScript
FROM American