I am trying to find the value of the 4th decimal place and check if it is a zero or not. If not I was planning on throwing an error message. For example 2.3189. I need to be able to check the value of the 4th decimal which in this case is 9. This is the code I have thus far. It seemed to be working for majority of cases but for example 1.2570. When I do the check for this number it says that the 0 is not a 0. When I do the same check with 1.2580 it says that the 0 is a 0. Any help with this would be greatly appreciated.
!!(submission && (quantity * 10000 % 10) === 0);