This should do it. I rewrote the prime finder code, lumping all the functions into one :
function findGreatestprimeFactor(number) {
var squareRoot = Math.sqrt(number)
var primeFactors = new array()
//See if i is a factor of number
for (i=2,i<squareRoot,i++) {
if ((number % i) != 0){
continue;
}
else {
//Check if i is prime
for (j=0,j<primeFactors.length,j++) {
if (i % primeFactors[j] == 0) {
break;
}
else if (j == primeFactors.length) {
//If i isn't divisible by all smaller primes, it's prime.
primeFactors.push(i);
}
}
}
}
if (primeFactors.length == 0) {
return "YOU SUCK";
}
else {
return primeFactors[primeFactors.length - 1];
}
}
Slightly obfuscated, there may be errors.
I completely agree with this entire post. Especially the ice cream. You should only ever pay for a certification if it is guaranteed to pay for itself (i.e. you will get a job as a direct result of getting the certification). Outside of that, very few employers care about certifications.
That's what I was thinking. Obviously I'm not thinking enough lately.
I thought you said a certification was always good? They are useful in a few cases, but only when the employer is inundated with resumes and need to thin down the crowd in some arbitrary way.
Awesome comic I found: