I'm working on an app. I'm using JavaScript to save values to a database. My database table has a column that holds a Decimal value. It works fine with some old C# code. In fact, in C#, I'd do this:
decimal? myValue = null;
decimal temp = 0;
if (Decimal.TryParse(myString, out temp)) {
myValue = temp;
}
I understand that JavaScript only has a single Number type. However, because I'm saving my value to the database, how do I ensure that its a decimal? In C#, I know that a Float is basically a 32-bit value, a Double is basically a 64-bit value, and a Deciml is basically a 128-bit value. However, I'm not sure how to translate this to JavaScript.
Can anyone provide some insights?
Thanks!