. You are a Winner! « Torchwood Archives
Torchwood Archives

You are a Winner!

I would like to say thank you to everyone who participated in my little giveaway. This little piece of javascript has chosen the lucky pilot, who will have a brand new Talos battlecruiser:


As many of you know, Math.random() returns a pseudorandom number between 0 and 1. Ten people commented under the post, so we need a range from 1 to 10. We have to multiply the output by 10 and add one, so the output range starts with 1. The last step is to truncate the fraction part. We can do it with the Math.floor() function.

The winning number is 8.

The eighth person to comment (not the 8th comment! one of the participants has commented twice) was...


Congratulations! I have contracted your ship to you in the game.

Comments (0) Trackbacks (0)

Sorry, the comment form is closed at this time.

Trackbacks are disabled.