If you have spent any time on code wars, finding if a number is prime is a common theme amongst a category of problems. When I first started coding I thought looping through all numbers 1 to num and checking if it was divisible was a great approach. …