I am a JS newbie and have received my first task. I need to write a function that will enforce precision.
I will need to test for NAN. If it's a string, I will need to convert it to a number and then enforce the precision to two decimals places.
Does anyone have a similiar script I can take a look at? Or any suggestions for me?
In addition, I will then need to round up.
Thank you in advance.
Cathy Myers
I will need to test for NAN. If it's a string, I will need to convert it to a number and then enforce the precision to two decimals places.
Does anyone have a similiar script I can take a look at? Or any suggestions for me?
In addition, I will then need to round up.
Thank you in advance.
Cathy Myers