Coin flip

Author Avatar
st 2020年11月26日
  • 在其它设备中阅读本文章

At the end of the day, we are all gambling with our lives.

I'm a gambler by trade.

Winning or losing I do not care.

Just love the idea of letting destiny take the lead.

So why don't we toss a coin?

Heads or tails I do not care.

Let's see where lady luck wants me to be.

So why don't I write a function?

async function flip() {
  try {
    const coin = [Heads, Tails];
    return coin[Math.floor(Math.random() * 2)];
  } catch (error) {}
}

Heads or tails I do not care.

It won't give me the answer I need.

Only a promise will be returned.

And a promise is all I want.

本文链接:https://blog.stsecurity.moe/archives/121/
Creative Commons License
This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License.