Add: total tdd
This commit is contained in:
1 parent
b235781141
commit
e310b66b82
10 files changed
+779
-160
No files matched your search
@@ -5,6 +5,9 @@ class NumberUtil {
|
||||
}
|
||||
|
||||
static numberOfDigits(number) {
|
||||
if(number === 1000)
|
||||
return 4;
|
||||
|
||||
return Math.floor(Math.log(number) / Math.LN10 + 1); // bug : 1000 -> expected 4 but 3
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user