Copy link to clipboard
Copied
I have a calculation to perform with 2 pieces of client supplied data. Sometimes this data is provided as <0.1 rather than specifying 0.085 for instance.
I have tried using variable.replace(/>/g,"") to remove the '>' character to be able to use just 0.1 as the data for calculation, but to no avail.
Can someone help?
eg.
var custData1 = "<0.1";
var custData2 = "50";
var sData = custData1.replace(/>/g,"");
var cCalc = (sData/custData2)*100;
Copy link to clipboard
Copied
Why are you removing ">" instead of "<"?
On Thu, May 12, 2016 at 12:01 AM, Chris72Caldwell <forums_noreply@adobe.com>