maymunskoa

Number of Decimal Digits (7 kyu)

Mar 27th, 2020
194
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function digits(n) {
  2.   let mydata = n + "";
  3.   return mydata.split(/[^\d]/g).join("").length;
  4. }
Advertisement
Add Comment
Please, Sign In to add comment