JavaScript is quite an amazing language:

true / (true - true) = +Infinity


function getRandomNumber(){
    return 4;  //chosen by fair dice roll.
               //guaranteed to be random. 

Random by definition means there is no obvious pattern. This time you get four, the next time you also get four, but you can never be sure the next next time you will also get four! (This proves that it is definitely random.)

"Everybody stand back, I know regular expressions!" ─ xkcd 208


Top Answers
1 2 3