Sunday, December 18, 2016

JavaScript - Sum of the first X prime numbers

I recently had a programming challenge where I had to find the sum of the first X prime numbers in JavaScript in a slightly compressed format, and couldn't find anything decent online.

So I coded this.

It could be far better, although the challenge was timed :P

Thanks to The Polyglot Developer for their "isPrime" function :)

No comments :

Post a Comment