Add: total tdd
This commit is contained in:
@@ -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