JAVASCRIPT Telegram 2355
CHALLENGE

function compose(...funcs) {
return function(x) {
return funcs.reduceRight((acc, fn) => fn(acc), x);
};
}

const add10 = x => x + 10;
const multiply2 = x => x * 2;
const toString = x => `Result: ${x}`;

const composed = compose(toString, multiply2, add10);
console.log(composed(5));
👍61



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

CHALLENGE

function compose(...funcs) {
return function(x) {
return funcs.reduceRight((acc, fn) => fn(acc), x);
};
}

const add10 = x => x + 10;
const multiply2 = x => x * 2;
const toString = x => `Result: ${x}`;

const composed = compose(toString, multiply2, add10);
console.log(composed(5));

BY JavaScript


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

View MORE
Open in Telegram


Telegram News

Date: |

Telegram channels enable users to broadcast messages to multiple users simultaneously. Like on social media, users need to subscribe to your channel to get access to your content published by one or more administrators. More>> The group also hosted discussions on committing arson, Judge Hui said, including setting roadblocks on fire, hurling petrol bombs at police stations and teaching people to make such weapons. The conversation linked to arson went on for two to three months, Hui said. 1What is Telegram Channels? Commenting about the court's concerns about the spread of false information related to the elections, Minister Fachin noted Brazil is "facing circumstances that could put Brazil's democracy at risk." During the meeting, the information technology secretary at the TSE, Julio Valente, put forward a list of requests the court believes will disinformation.
from us


Telegram JavaScript
FROM American