Extra Credit: nth Prime
Extra Credit: nth Prime

Generates primes by trial division. Time complexity is exponential in n. Calculating P(10001) took 2.76s in Chrome on 1.7GHz processor.

TGVarik/javascript-koans,TGVarik/javascript-koans