JAVASCRIPT Telegram 2277
CHALLENGE

function* counter() {
let i = 0;
while (true) {
const direction = yield i;
if (direction === 'up') i += 2;
else if (direction === 'down') i -= 1;
else i += 1;
}
}

const count = counter();
console.log(count.next().value);
console.log(count.next('up').value);
console.log(count.next('down').value);
console.log(count.next().value);
👍1🔥1



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

CHALLENGE

function* counter() {
let i = 0;
while (true) {
const direction = yield i;
if (direction === 'up') i += 2;
else if (direction === 'down') i -= 1;
else i += 1;
}
}

const count = counter();
console.log(count.next().value);
console.log(count.next('up').value);
console.log(count.next('down').value);
console.log(count.next().value);

BY JavaScript


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

View MORE
Open in Telegram


Telegram News

Date: |

Image: Telegram. Those being doxxed include outgoing Chief Executive Carrie Lam Cheng Yuet-ngor, Chung and police assistant commissioner Joe Chan Tung, who heads police's cyber security and technology crime bureau. Click “Save” ; Co-founder of NFT renting protocol Rentable World emiliano.eth shared the group Tuesday morning on Twitter, calling out the "degenerate" community, or crypto obsessives that engage in high-risk trading. Invite up to 200 users from your contacts to join your channel
from us


Telegram JavaScript
FROM American