This getExponential function name is confusing as it actually returns the length of the exponential part. A better name would be getExponentialLength or getExponentialPartLength.
Also this line const intConversor = Math.pow(10, exp) can quickly turn into infinity or integer overflow(> MAX_SAFE_INTEGER is the upper limit) so almost all operations will return the same number.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
This
getExponential
function name is confusing as it actually returns the length of the exponential part. A better name would begetExponentialLength
orgetExponentialPartLength
.Also this line
const intConversor = Math.pow(10, exp)
can quickly turn into infinity or integer overflow(> MAX_SAFE_INTEGER is the upper limit) so almost all operations will return the same number.