function getDivisorsCnt(n){
let counter = 0
for (let val=1; val<=n; val++){
if (n % val === 0 ){
return counter +=1
} else {
return counter
}
}
return counter
}
console.log(getDivisorsCnt(12))
function getDivisorsCnt(n){
let counter = 0
for (let val=1; val<=n; val++){
if (n % val === 0 ){
counter +=1
}
}
return counter;
}
console.log(getDivisorsCnt(12))