const smallestDivisor = (num) => {
let n = 3;
if (num === 1) {
return num;
} else if ( num % 2 === 0) {
return 2;
} else if (num % 3 === 0) {
return 3;
} else {
while(n > Math.pow(num, 0.5)){
n = n + 2;
if (num % n === 0) {
return n;
}
}
}
};
3 > Math.pow(11, 0.5)