Can you explain why the variable n is returning a value of 0 in the code snippet below?
var str = '\\nvga032.bmwgroup.net\QXE7868\Daten\IE\3_bookmarks.zzz'
var n = str.indexOf("\\");
alert(n) //0
It seems that the escape character for a backslash should be represented as
'\\'
I am confused as to why I am not finding a single backslash at the last position. I even tried using the lastIndexOf method, but it also returns zero. Could the presence of multiple '.' characters be causing this issue?