JAVASCRIPT Telegram 2395
CHALLENGE

function* fibonacci() {
let [a, b] = [0, 1];
while (true) {
yield a;
[a, b] = [b, a + b];
}
}

const fib = fibonacci();

const result = [];
for (let i = 0; i < 4; i++) {
result.push(fib.next().value);
}

const sum = result.reduce((total, num) => total + num, 0);
console.log(sum);
👍53



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

CHALLENGE

function* fibonacci() {
let [a, b] = [0, 1];
while (true) {
yield a;
[a, b] = [b, a + b];
}
}

const fib = fibonacci();

const result = [];
for (let i = 0; i < 4; i++) {
result.push(fib.next().value);
}

const sum = result.reduce((total, num) => total + num, 0);
console.log(sum);

BY JavaScript


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

View MORE
Open in Telegram


Telegram News

Date: |

Activate up to 20 bots Today, we will address Telegram channels and how to use them for maximum benefit. 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. As five out of seven counts were serious, Hui sentenced Ng to six years and six months in jail. During a meeting with the president of the Supreme Electoral Court (TSE) on June 6, Telegram's Vice President Ilya Perekopsky announced the initiatives. According to the executive, Brazil is the first country in the world where Telegram is introducing the features, which could be expanded to other countries facing threats to democracy through the dissemination of false content.
from us


Telegram JavaScript
FROM American