tjyoung
asked on
Trying to use .replace to get rid of a minus sign if present, but not working
HI,
I seem to be getting a 'not a function' error when using this line in the code below:
unique_opens_percent = unique_opens_percent.repla ce("", "-");
I'm trying to remove a dash/minus sign that may be in the unique_opens_percent variable.
Any idea where I'm going wrong? If I take out the line, the rest of the code works fine.
Thanks for any help.
tj
I seem to be getting a 'not a function' error when using this line in the code below:
unique_opens_percent = unique_opens_percent.repla
I'm trying to remove a dash/minus sign that may be in the unique_opens_percent variable.
Any idea where I'm going wrong? If I take out the line, the rest of the code works fine.
var unique_opens_percent = data.campaign.unique_opens / (data.previous_campaign.campaign.unique_opens/100) - 100;
unique_opens_percent = unique_opens_percent.replace("", "-");
unique_opens_percent = unique_opens_percent.toFixed(0);
Thanks for any help.
tj
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER