Begun work on problem 3 in Javascript, currently returns the biggest prime factor of the biggest factor of x