I have a windows path and I'm trying to make backslashes turn into forward slashes which works for the 2 \ after the drive name and the middle slash but the end slash doesn't get changed. I would think the 2nd replace should change both the middle AND last but it doesn't. Any idea why?
var test = "D:\\\\Games\\Scrolls\\";
console.log(test.replace("\\\\", "//").replace("\\", "/"));