SHARE
TWEET

Untitled

a guest Sep 21st, 2019 77 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
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top