Advertisement
Guest User

Untitled

a guest
May 10th, 2022
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.27 KB | None | 0 0
  1. function getDivisorsCnt(n){
  2. let DividingByThis = 1
  3. let Divisors = 0
  4.  
  5. while (DividingByThis <= n){
  6. if (n % DividingByThis === 0) {
  7. Divisors++
  8. DividingByThis++
  9. } else (n % DividingByThis === 1)
  10. DividingByThis++
  11. }
  12.  
  13. Return Divisors
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement