I'm parsing text file using Javascript. On the lines I have slice()
function, my code appear to behave differently on local host and online
for example
if(connection == 'local') {
value = d.substring(split2, split3).substr(1).slice(0, -1);
}
else if(connection == 'online') {
value = d.substring(split2, split3).substr(1);
}
However this piece of code solve it but I cannot understand the behavior, it seems like when I use my code online that are extra hidden characters on the text file or something