Guest User

Untitled

a guest
Sep 21st, 2019
80
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. three = (num) => {
  2. let total = 0;
  3. let numAr = num.toString(10).split('').map(Number)
  4. numAr.forEach(elem => {
  5. total += elem
  6. })
  7. const set = new Set(numAr).size
  8. console.log(set === 1 ? true : false)
  9. console.log(total)
  10. }
RAW Paste Data