Reputation: 14088
Hello I have next JS code (this code not my own)
function somename(f)
var procName = "";
var procParams = new Array();
var parseEl = "";
var parseEls = new Array();
var parseInd = 0;
var procParamsInd = 0;
var IsValRead = false;
for (i = 0; i < f.length; i++) {
if (f[i] == "(")
break;
else
procName = procName + f[i];
}
}
I will redo it to much better way to find data before "(", but i wounder why procName variable is always undefined in IE9 in all browsers all working well.
Upvotes: 0
Views: 394
Reputation: 16033
I have a vague recollection that at least some versions of IE do not support indexing to access string characters. Try using charAt instead; or a better algorithm. It is almost certainly the f[x] which is causing your undefined's.
Upvotes: 1