S
S
skuvaWeb2018-12-29 01:27:17
JavaScript
skuvaWeb, 2018-12-29 01:27:17

A function that converts a number to millions?

Tell me how to implement a function that converts a number to millions, for example:
test(500000) -> 0.5
test(1500000) -> 1.5
test(10000000) -> 10

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alex, 2018-12-29
@skuvaWeb

Something like this:
function test(value) { return value / 1000000; }

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question