I'm having a bit of a go slow in the brain department today and thought maybe somone had done this before.
Given the numbers below, what simple means could I use in Javascript to work out the decimal point as a number, eg:
- 1 = Decimal point: 0
- 10 = Decimal point: 1
- 1678 = Decimal point: 3
- -0.56 = Decimal point: -1
- -0.0045 = Decimal point: -3