My example is paired down but I believe it communicates my problem:
I have a simple string var data = '360–400 '
for sake of example:
data.replace(' ');
returns:
//360–400undefined
Question: how do I make sure my output doesnt leave undefines in the string